Skip to content

Misleading help text for metadata --quiet #8928

Closed

Description

@jonhoo

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)

Activity

  1. bishtpawan commented on Dec 21, 2020

    @bishtpawan
    Contributor

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

    Thanks

  2. jonhoo commented on Dec 22, 2020

    @jonhoo
    ContributorAuthor

    Hmm, how about:

    Do not print cargo log messages.

  3. bishtpawan commented on Dec 22, 2020

    @bishtpawan
    Contributor

    Looks good to me. Thanks

  4. added a commit that references this issue on Jan 6, 2021
  5. Maxpxt commented on Oct 21, 2021

    @Maxpxt

    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.

  6. added a commit that references this issue on Nov 15, 2021
  7. added a commit that references this issue on Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions