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

Misleading help text for metadata --quiet #8928

Closed
jonhoo opened this issue Dec 1, 2020 · 4 comments · Fixed by #10080
Closed

Misleading help text for metadata --quiet #8928

jonhoo opened this issue Dec 1, 2020 · 4 comments · Fixed by #10080
Labels
A-cli-help Area: built-in command-line help A-documenting-cargo-itself Area: Cargo's documentation C-bug Category: bug

Comments

@jonhoo
Copy link
Contributor

jonhoo commented Dec 1, 2020

Problem
cargo metadata --quiet prints to stdout even though --help says

OPTIONS:
    -q, --quiet                          No output printed to stdout

Steps

  1. cargo metadata --help
  2. cargo metadata --quiet
  3. Observe that stdout is not empty

Possible Solution(s)
Obviously, --quiet meant to indicate that no cargo messages are printed to stdout (or maybe stderr) like "Updating index". But, the way it's written, it clearly implies that no output should go to stdout.

Notes

Output of cargo version: cargo 1.47.0 (f3c7e06 2020-08-28)

@jonhoo jonhoo added the C-bug Category: bug label Dec 1, 2020
@bishtpawan
Copy link
Contributor

Hi @jonhoo, can you please share the message that fits this scenario?

Thanks

@jonhoo
Copy link
Contributor Author

jonhoo commented Dec 22, 2020

Hmm, how about:

Do not print cargo log messages.

@bishtpawan
Copy link
Contributor

Looks good to me. Thanks

bors added a commit that referenced this issue Jan 6, 2021
Updated display message of cargo metadata --help

Resolved Issue #8928
@ehuss ehuss added A-cli-help Area: built-in command-line help A-documenting-cargo-itself Area: Cargo's documentation labels Jan 7, 2021
@Maxpxt
Copy link

Maxpxt commented Oct 21, 2021

This also applies to cargo build --quiet, cargo run --quiet, cargo test --quiet, cargo bench --quiet, cargo doc --quiet, and possibly other commands. They are all documented as "No output printed to stdout", but warnings, errors, test results, ..., are shown.

@bors bors closed this as completed in 83bd9f6 Nov 15, 2021
bors added a commit that referenced this issue Dec 6, 2021
Unify the description of quiet flag

cc: #8928
I seem to have missed it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli-help Area: built-in command-line help A-documenting-cargo-itself Area: Cargo's documentation C-bug Category: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants