-
Notifications
You must be signed in to change notification settings - Fork 510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
just_executable() and other functions return the native path, not the cygpath, when in Windows #2599
Comments
You're not alone in being confused 😅 The dependency on I believe that Git Bash uses cygwin and provides cygpath.exe. The two places where The You can translate paths manually
I think we could consider providing helper functions for these, ideally without depending on |
a) It is indeed not clear in the manual. You may want to add to it. I would also add a "how to" page on how to use (or is b) Another complication: WSL adds a C:\Users\xyz>where bash That means one has to write the full path for Cygwin Bash on Windows: set windows-shell := [ "C:\cygwin64\bin\bash.exe", "-uc"] with double \ c) If cygpath is not in the path, should At least there should be a d) The transformation of Windows paths into POSIX depends on the shell
so you may need a setting for "conversion style" e) See also the crates: https://docs.rs/typed-path/latest/typed_path/ |
I opened #2602 to document in one place how Returning Windows paths for all functions except I'm not sure we can provide facilities to convert between paths. We would either have to depend on |
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()}}'
Not clear: does
just
requirecygpath.exe
in the system $PATH while on Windows? does it fail if it does not find it?The sentence above also conflicts with https://just.systems/man/en/paths-on-windows.html
There should be a function to normalize Windows path to Unix / POSIX paths and vice-versa.
The text was updated successfully, but these errors were encountered: