Skip to content

Improve handling of clap errors #3905

@rami3l

Description

@rami3l

Problem you are trying to solve

Split from #3812:

A new-ish user got confused about the command for updating rustup itself and tried rustup update self which gave this error:

error: error: invalid value 'self' for '[toolchain]...': invalid toolchain name: 'self'

For more information, try '--help'.
: invalid toolchain name: 'self'

@ChrisDenton and @Xerxes-2 have expressed concerns about duplicated info in the error message.

Solution you'd like

Make the error report format cleaner by changing it to something like:

error: invalid value 'self' for '[toolchain]...': invalid toolchain name: 'self'

For more information, try '--help'.

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions