Skip to content

Can't publish from workspace root, no -p option #7345

Closed
@Riateche

Description

@Riateche

Unlike other cargo commands, cargo publish doesn't accept -p or --package option, so cargo publish doesn't work at all at the workspace root:

$ cargo publish
error: manifest path `.../Cargo.toml` is a virtual manifest, but this command requires running against an actual package in this workspace
$ cargo publish -p name 
error: Found argument '-p' which wasn't expected, or isn't valid in this context

Lack of the -p option seems like an oversight.

Metadata

Metadata

Assignees

Labels

C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-publishE-easyExperience: Easy

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions