mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Auto merge of #12660 - epage:dry, r=weihanglo
feat(cli): Add '-n' to dry-run This came from #12638 and my many small frustrations from wanting to use `-n` and not being able to. We do not have any existing `-n` flags for this to be confused with. I would wager that `-n` is such an entrenched short flag in build tools that it would not make sense for us to use it with any other flag. For a survey of where `-n` is used as a short, see https://www.gnu.org/prep/standards/html_node/Option-Table.html#Option-Table
This commit is contained in:
commit
695416e8d8
@ -302,7 +302,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 {
|
||||
|
@ -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
|
||||
|
@ -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 upload the package to
|
||||
--token <TOKEN> Token to use when uploading
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user