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

-q suppressing stderr output, but not all of it #2735

Closed
birkenfeld opened this issue May 24, 2016 · 1 comment
Closed

-q suppressing stderr output, but not all of it #2735

birkenfeld opened this issue May 24, 2016 · 1 comment

Comments

@birkenfeld
Copy link
Contributor

This is with cargo 0.11.0 (ca743f3 2016-05-23) and rustc 1.10.0-nightly (764ef92ae 2016-05-19).

The option help (checked cargo build, cargo run) says

-q, --quiet             No output printed to stdout

while most of (all of?) Cargo's messages are printed to stderr.

When using the option, some output is not suppressed, for example the error: Process didn't exit successfully when using cargo run and getting a nonzero exit status.

This makes it unnecessarily hard to use cargo run and capture the output of only the subprocess. (In my case, using target/debug/foo directly is cumbersome because the executable is partially dynamically linked and cargo is doing nice things like setting LD_LIBRARY_PATH correctly for me.)

@alexcrichton
Copy link
Member

Yeah currently the shell continues to emit errors whenever it's configured in quiet mode, but this should probably be suppressed for the binary itself for cargo run

alexcrichton added a commit to alexcrichton/cargo that referenced this issue Jun 9, 2016
If a process fails then it's probably printing out why and Cargo doesn't need to
do it all over again.

Closes rust-lang#2735
bors added a commit that referenced this issue Jun 10, 2016
Don't print extra info on -q + `cargo run`

If a process fails then it's probably printing out why and Cargo doesn't need to
do it all over again.

Closes #2735
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants