From 4fd0c3c46cef1d8a21bfdb7320f83fb6dd1b546a Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 31 Jul 2023 21:21:02 -0500 Subject: [PATCH] fix(update): Group -p related flags --- src/bin/cargo/commands/update.rs | 2 +- tests/testsuite/cargo_update/help/stdout.log | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/cargo/commands/update.rs b/src/bin/cargo/commands/update.rs index c5a6eb6b136..bd3f3de4cbb 100644 --- a/src/bin/cargo/commands/update.rs +++ b/src/bin/cargo/commands/update.rs @@ -16,7 +16,6 @@ pub fn cli() -> Command { ) .conflicts_with("precise"), ) - .arg_dry_run("Don't actually write the lockfile") .arg( opt( "precise", @@ -26,6 +25,7 @@ pub fn cli() -> Command { .requires("package"), ) .arg_manifest_path() + .arg_dry_run("Don't actually write the lockfile") .after_help("Run `cargo help update` for more detailed information.\n") } diff --git a/tests/testsuite/cargo_update/help/stdout.log b/tests/testsuite/cargo_update/help/stdout.log index 46b83f32a28..222914423f1 100644 --- a/tests/testsuite/cargo_update/help/stdout.log +++ b/tests/testsuite/cargo_update/help/stdout.log @@ -7,9 +7,9 @@ Options: -w, --workspace Only update the workspace packages -p, --package [] Package to update --aggressive Force updating all dependencies of SPEC as well when used with -p - --dry-run Don't actually write the lockfile --precise Update a single dependency to exactly PRECISE when used with -p --manifest-path Path to Cargo.toml + --dry-run Don't actually write the lockfile -h, --help Print help -v, --verbose... Use verbose output (-vv very verbose/build.rs output) --color Coloring: auto, always, never