-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
A-diagnosticsArea: Error and warning messages generated by Cargo itself.Area: Error and warning messages generated by Cargo itself.C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-publish
Description
Problem
$ cargo publish --dry-run
error: `xxxxxxxx` cannot be published.
The registry `crates-io` is not listed in the `publish` value in Cargo.toml.
It’s a bit stupid on my part, I forgot for a second that I had publish = false
in my Cargo.toml
to prevent publishing, but this error message threw me off.
I can imagine that some other folks would run into this too, so I’m raising this here.
Proposed Solution
How about an error message, if publish = false
, along the lines of:
error: `xxxxxxxx` cannot be published.
`publish` is set to `false` in Cargo.toml and prevents publishing.
Notes
No response
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Error and warning messages generated by Cargo itself.Area: Error and warning messages generated by Cargo itself.C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-publish