Skip to content

Incorrectly suggests --verbose when subcommand fails #2673

@kornelski

Description

@kornelski
$ cargo clippy
thread '<main>' panicked at 'need to specify SYSROOT env var during clippy compilation or use multirust', ../src/libcore/option.rs:699
note: Run with `RUST_BACKTRACE=1` for a backtrace.
error: third party subcommand `cargo-clippy` exited unsuccessfully

To learn more, run the command again with --verbose.

I tried again with --verbose and got exactly the same output, asking for verbose again:

$ cargo clippy --verbose
thread '<main>' panicked at 'need to specify SYSROOT env var during clippy compilation or use multirust', ../src/libcore/option.rs:699
note: Run with `RUST_BACKTRACE=1` for a backtrace.
error: third party subcommand `cargo-clippy` exited unsuccessfully

To learn more, run the command again with --verbose.

So I thought maybe it's like git which has a different interpretation of options before a subcommand:

$ cargo --verbose clippy
error: Invalid arguments.

Usage:
    cargo <command> [<args>...]
    cargo [options]

Nope :/ So it seems --verbose doesn't work in that situation, and the recommendation is out of place.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions