-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Win32 Alternate data streams don't work with Command in Rust 1.58.0 #93772
Comments
I believe this is now the excepted behavior: Windows: Resolve process::Command program without using the current directory You could check if it works by making the executable explicitly relative by appending cc @ChrisDenton |
Indeed. The release announcement for 1.58 gives the motivation for why the current directory is no longer used. In short, it was considered a security risk. |
Ah, you're correct. Using |
Since Rust 1.58, code using
Command
to spawn new processes that live in an alternate data stream on Windows fails to work. Alternate Data Streams are files that have a:suffix
, such asfilename.exe:alt
.Code
This is the code that fails:
I expected to see this happen: The command spawns properly and executes the find.exe code
Instead, this happened: The unwrap fails with
Version it worked on
It most recently worked on: Rust 1.57.x
Version with regression
I believe the commit that broke it is d9a1f9a
@rustbot modify labels: +regression-from-stable-to-stable -regression-untriaged
The text was updated successfully, but these errors were encountered: