Skip to content

just_executable() and other functions return the native path, not the cygpath, when in Windows #2599

@john-cd

Description

@john-cd
  1. I am confused by the following sentence in the just doc:

On Windows, invocation_directory() uses cygpath to convert the invocation directory to a Cygwin-compatible /-separated path. Use invocation_directory_native() to return the verbatim invocation directory on all platforms.

Running the following on Windows, I still get Windows-native paths e.g. D:\some\thing\

@test:
echo '{{just_executable()}}'
echo '{{justfile()}}'
echo '{{justfile_directory()}}'
echo '{{source_directory()}}'
echo '{{invocation_directory()}}'

  1. Not clear: does just require cygpath.exe in the system $PATH while on Windows? does it fail if it does not find it?

  2. The sentence above also conflicts with https://just.systems/man/en/paths-on-windows.html

  3. There should be a function to normalize Windows path to Unix / POSIX paths and vice-versa.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions