-
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
Quote bat script command line #92208
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
r? @dtolnay (rust-highfive has picked a reviewer for you, use r? to override) |
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Dec 22, 2021
dtolnay
approved these changes
Dec 22, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@bors r+ |
📌 Commit de764a7 has been approved by |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Dec 22, 2021
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 23, 2021
…askrgr Rollup of 7 pull requests Successful merges: - rust-lang#88858 (Allow reverse iteration of lowercase'd/uppercase'd chars) - rust-lang#91544 (Fix duplicate derive clone suggestion) - rust-lang#92026 (Add some JSDoc comments to rustdoc JS) - rust-lang#92117 (kmc-solid: Add `std::sys::solid::fs::File::read_buf`) - rust-lang#92139 (Change Backtrace::enabled atomic from SeqCst to Relaxed) - rust-lang#92146 (Don't emit shared files when scraping examples from dependencies in Rustdoc) - rust-lang#92208 (Quote bat script command line) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Mark-Simulacrum
added
the
beta-nominated
Nominated for backporting to the compiler in the beta channel.
label
Jan 6, 2022
m-ou-se
added
the
beta-accepted
Accepted for backporting to the compiler in the beta channel.
label
Jan 6, 2022
Mark-Simulacrum
removed
the
beta-nominated
Nominated for backporting to the compiler in the beta channel.
label
Jan 7, 2022
Merged
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 8, 2022
…ulacrum [beta] backports Backports these PRs: * Fix HashStable implementation on InferTy rust-lang#91892 * Revert setting a default for the MACOSX_DEPLOYMENT_TARGET env var for linking rust-lang#91870 * Make rustdoc headings black, and markdown blue rust-lang#91534 * Disable LLVM newPM by default rust-lang#91190 * Deduplicate projection sub-obligations rust-lang#90423 * Sync portable-simd to remove autosplats rust-lang#91484 by dropping portable_simd entirely (keeping the subtree, just from std/core) * Quote bat script command line rust-lang#92208 * Fix failing tests rust-lang#92201 (CI fix) r? `@Mark-Simulacrum`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
beta-accepted
Accepted for backporting to the compiler in the beta channel.
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #91991
CreateProcessW
should only be used to run exe files but it does have some (undocumented) special handling for files with.bat
and.cmd
extensions. Essentially those magic extensions will cause the parameters to be automatically rewritten. Example pseudo Rust code (note thatCreateProcess
starts with an optional application name followed by the application arguments):However, when setting the first parameter (the application name) as we now do, it will omit the extra level of quotes around the arguments:
This means the arguments won't be passed to the script as intended.
Note that running batch files this way is undocumented but people have relied on this so we probably shouldn't break it.