Skip to content
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

Shell escape arguments in output #1770

Merged
merged 9 commits into from Jul 1, 2015

Conversation

Projects
None yet
5 participants
@alexcrichton
Copy link
Member

alexcrichton commented Jun 29, 2015

Tweaked version of #1673.

root and others added some commits May 2, 2015

root
Shell escape process arguments that are printed out
cargo build --verbose does output some command lines that cannot be
simply copy and pasted into the shell again. The problem is the
arguments which are output exactly like this: --feature="foo"

When pasted back into the shell, the shell will parse and remove the
double quotes. To counteract this, escape special shell characters when
printing commandlines. Cargo will print --feature=\"foo\" instead, which
can be pasted back into the shell.
root
Shell Escape for Windows
With great help from @retep998
root
Don't conditionally compile escaping strategies
Compile them both in and select at runtime.
@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jun 29, 2015

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jun 29, 2015

⌛️ Testing commit 8b378da with merge 9cfa5d2...

bors added a commit that referenced this pull request Jun 29, 2015

@rust-highfive

This comment has been minimized.

Copy link

rust-highfive commented Jun 29, 2015

r? @huonw

(rust_highfive has picked a reviewer for you, use r? to override)

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jun 29, 2015

💔 Test failed - cargo-win-msvc-64

Tweak escaping on Windows shells
Also detect if we're on Windows whether we're an MSYS or cmd.exe shell at
runtime

@alexcrichton alexcrichton reopened this Jul 1, 2015

@alexcrichton alexcrichton force-pushed the alexcrichton:shell branch from 4aae357 to ea41f5c Jul 1, 2015

@alexcrichton

This comment has been minimized.

Copy link
Member Author

alexcrichton commented Jul 1, 2015

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jul 1, 2015

⌛️ Testing commit ea41f5c with merge 89435c4...

bors added a commit that referenced this pull request Jul 1, 2015

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Jul 1, 2015

@bors bors merged commit ea41f5c into rust-lang:master Jul 1, 2015

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details

@alexcrichton alexcrichton deleted the alexcrichton:shell branch Jul 17, 2015

@joshtriplett

This comment has been minimized.

Copy link
Member

joshtriplett commented Jun 28, 2018

It looks like something got missed in this change: cargo build -v and similar don't quote arguments like --cfg feature="default" , so if you paste them into a shell, the shell eats the doublequotes. That needs to get printed like --cfg 'feature="default"' . (Or, alternatively, rustc needs to stop requiring the doublequotes there, but that seems less likely.)

Reported as #5665

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.