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

feat(cli): Add '-n' to dry-run #12660

Merged
merged 1 commit into from
Sep 18, 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
2 changes: 1 addition & 1 deletion src/cargo/util/command_prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ pub trait CommandExt: Sized {
}

fn arg_dry_run(self, dry_run: &'static str) -> Self {
self._arg(flag("dry-run", dry_run))
self._arg(flag("dry-run", dry_run).short('n'))
}

fn arg_ignore_rust_version(self) -> Self {
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/cargo_add/help/stdout.log
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Options:
--ignore-rust-version
Ignore `rust-version` specification in packages (unstable)

--dry-run
-n, --dry-run
Don't actually write the manifest

-q, --quiet
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/cargo_publish/help/stdout.log
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Upload a package to the registry
Usage: cargo[EXE] publish [OPTIONS]

Options:
--dry-run Perform all checks without uploading
-n, --dry-run Perform all checks without uploading
--index <INDEX> Registry index URL to upload the package to
--registry <REGISTRY> Registry to publish to
--token <TOKEN> Token to use when uploading
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/cargo_remove/help/stdout.log
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Arguments:
<DEP_ID>... Dependencies to be removed

Options:
--dry-run Don't actually write the manifest
-n, --dry-run Don't actually write the manifest
-q, --quiet Do not print cargo log messages
-v, --verbose... Use verbose output (-vv very verbose/build.rs output)
--color <WHEN> Coloring: auto, always, never
Expand Down
2 changes: 1 addition & 1 deletion tests/testsuite/cargo_update/help/stdout.log
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Update dependencies as recorded in the local lock file
Usage: cargo[EXE] update [OPTIONS] [SPEC]...

Options:
--dry-run Don't actually write the lockfile
-n, --dry-run Don't actually write the lockfile
--recursive Force updating all dependencies of [SPEC]... as well
--precise <PRECISE> Update [SPEC] to exactly PRECISE
-q, --quiet Do not print cargo log messages
Expand Down