-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
process::Command on Windows doesn't work with canonicalized paths #133553
Comments
I think this is fundamentally another case of #42869. Some software just does not like |
I should also note that
Essentially only paths like What |
Wouldn't this change the semantics of what the path is? As far as I could understand, My guess is that, as far as Rustc is concerned, everything is okay (unless there is something more in #42869 mentioned by @ehuss) and rustc |
Sure, simply removing However, what I've done in other projects is to test if the it's possible to round trip paths without change. E.g. if after converting the path, |
I found a "weird" issue with std::process::Command and canonicalized paths on Windows. Something like (which assumes lsd is installed on the machine):
... works fine for the first execution, showing the current directory contents; but the second execution fails with
... which looks like it is caused due
.canonicalize()
prefixing the path with "\\?\" -- which, for what I can understand, correct, telling Windows that the path must be taken as-in, without any processing.Meta
rustc --version --verbose
:Also note that I'm cross-compiling from Linux to Windows, using "x86_64-pc-windows-gnu" as target triple.
The text was updated successfully, but these errors were encountered: