Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo yank's error message should be clearer #8695

Closed
withoutboats opened this issue Sep 10, 2020 · 2 comments · Fixed by #8697
Closed

cargo yank's error message should be clearer #8695

withoutboats opened this issue Sep 10, 2020 · 2 comments · Fixed by #8697
Labels
A-diagnostics Area: Error and warning messages generated by Cargo itself. C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-yank E-easy Experience: Easy

Comments

@withoutboats
Copy link
Contributor

If you try to use cargo yank without passing the --vers flag, it errors with the message:

error: a version must be specified to yank

It would be helpful if this message specified that the version must be specified using the --vers flag. My prompt just now looks like:

> cargo yank
error: a version must be specified to yank
> cargo yank 0.7
error: a version must be specified to yank
> cargo yank 0.7.0
error: a version must be specified to yank
> cargo yank --help
...
> cargo yank --vers 0.7.0
@withoutboats withoutboats added the C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` label Sep 10, 2020
@Eh2406 Eh2406 added E-easy Experience: Easy E-help-wanted labels Sep 10, 2020
@Eh2406
Copy link
Contributor

Eh2406 commented Sep 10, 2020

Looks like the code is

None => bail!("a version must be specified to yank"),
I'd love a PR with a better message!

@Eh2406 Eh2406 added A-diagnostics Area: Error and warning messages generated by Cargo itself. Command-yank labels Sep 10, 2020
@Mikastiv
Copy link
Contributor

#8697 I changed the message in this PR

@bors bors closed this as completed in 8777a6b Sep 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Error and warning messages generated by Cargo itself. C-feature-request Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted` Command-yank E-easy Experience: Easy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants