Skip to content

cargo login should try detecting errors  #4434

@sugar700

Description

@sugar700

When using cargo login, cargo asks for

please visit https://crates.io/me and paste the API Token below

While the input is trimmed, there is more that can be done, for instance removing cargo login from beginning of token (if an entire command is pasted for some reason) and detecting things that definitely aren't tokens (too short or too long to be them, having invalid token characters and so on).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Error and warning messages generated by Cargo itself.C-enhancementCategory: enhancementCommand-login

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions