-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Windows: Quote more batch file arguments #108218
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
Conversation
|
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
39d3bc6 to
9ba1fab
Compare
9ba1fab to
09956ed
Compare
Make sure to quote batch file arguments that contain command prompt special characters. Additionally add `/d` command line parameter to disable any commands that may change the way variable expansion works.
09956ed to
0b7c867
Compare
|
@bors r+ |
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#108063 (Ban associated type bounds in bad positions) - rust-lang#108208 (Correctly handle aggregates in DataflowConstProp) - rust-lang#108218 (Windows: Quote more batch file arguments) - rust-lang#108349 (rustdoc: Prevent duplicated imports) - rust-lang#108350 (Use associated type bounds in some places in the compiler) - rust-lang#108358 (Add git config command to `.git-blame-ignore-revs`) - rust-lang#108373 (hir-analysis: make where-clause-on-main diagnostic translatable) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Make sure to always quote batch file arguments that contain command prompt special characters.
Additionally add
/dcommand line parameter to disable any autorun scripts that may change the way variable expansion works. This makes it more consistent across systems and may help avoid surprises.Background Info
CreateProcesswith thelpApplicationNameset can only be used to run.exefiles and not script files such as.bat. However, for historical reasons, we do have special handling so that.batfiles will be correctly run withcmd.exeas the application.In Windows, command line arguments are passed as a single string (not an array). Applications can parse this string however they like but most follow the standard MSVC C/C++ convention. But
cmd.exeuses different argument parsing rules to other Windows programs (because it emulates old DOS). This PR aims to help smooth over some of the differences.r? libs