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

Clarify flag behavior in cargo remove --help #12823

Merged
merged 1 commit into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/bin/cargo/commands/remove.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,19 @@ pub fn cli() -> clap::Command {
.conflicts_with("build")
.action(clap::ArgAction::SetTrue)
.group("section")
.help("Remove as development dependency"),
.help("Remove from dev-dependencies"),
clap::Arg::new("build")
.long("build")
.conflicts_with("dev")
.action(clap::ArgAction::SetTrue)
.group("section")
.help("Remove as build dependency"),
.help("Remove from build-dependencies"),
clap::Arg::new("target")
.long("target")
.num_args(1)
.value_name("TARGET")
.value_parser(clap::builder::NonEmptyStringValueParser::new())
.help("Remove as dependency from the given target platform"),
.help("Remove from target-dependencies"),
])
.arg_package("Package to remove from")
.arg_manifest_path()
Expand Down
6 changes: 3 additions & 3 deletions tests/testsuite/cargo_remove/help/stdout.log
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ Options:
-h, --help Print help

Section:
--dev Remove as development dependency
--build Remove as build dependency
--target <TARGET> Remove as dependency from the given target platform
--dev Remove from dev-dependencies
--build Remove from build-dependencies
--target <TARGET> Remove from target-dependencies

Package Selection:
-p, --package [<SPEC>] Package to remove from
Expand Down