Better error report when crate name is empty #13314
Labels
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
S-triage
Status: This issue is waiting on initial triage.
Problem
When adding a crate via
cargo add
, if one adds a space before the version (such that it'scargo add chumsky @1.0.0-alpha.6
instead ofcargo add [email protected]
), Cargo will panic with the following failed assertion:Proposed Solution
When the crate name to add is empty, print a nicer error instead.
Notes
Here's another potentially interesting output to look at:
The text was updated successfully, but these errors were encountered: