Remove --force from global_options.

This commit is contained in:
Markus Reiter 2020-07-27 03:59:52 +02:00
parent 698ac63a06
commit c0d42dd922
17 changed files with 43 additions and 24 deletions

View File

@ -34,7 +34,6 @@ module Homebrew
quiet: [["-q", "--quiet"], :quiet, "Suppress any warnings."], quiet: [["-q", "--quiet"], :quiet, "Suppress any warnings."],
verbose: [["-v", "--verbose"], :verbose, "Make some output more verbose."], verbose: [["-v", "--verbose"], :verbose, "Make some output more verbose."],
debug: [["-d", "--debug"], :debug, "Display any debugging information."], debug: [["-d", "--debug"], :debug, "Display any debugging information."],
force: [["-f", "--force"], :force, "Override warnings and enable potentially unsafe operations."],
} }
end end

View File

@ -21,7 +21,7 @@ module Homebrew
description: "Fetch HEAD version instead of stable version." description: "Fetch HEAD version instead of stable version."
switch "--devel", switch "--devel",
description: "Fetch development version instead of stable version." description: "Fetch development version instead of stable version."
switch :force, switch "-f", "--force",
description: "Remove a previously cached version and re-fetch." description: "Remove a previously cached version and re-fetch."
switch :verbose, switch :verbose,
description: "Do a verbose VCS checkout, if the URL represents a VCS. This is useful for "\ description: "Do a verbose VCS checkout, if the URL represents a VCS. This is useful for "\

View File

@ -71,7 +71,7 @@ module Homebrew
depends_on: "--build-bottle", depends_on: "--build-bottle",
description: "Optimise bottles for the specified architecture rather than the oldest "\ description: "Optimise bottles for the specified architecture rather than the oldest "\
"architecture supported by the version of macOS the bottles are built on." "architecture supported by the version of macOS the bottles are built on."
switch :force, switch "-f", "--force",
description: "Install without checking for previously installed keg-only or "\ description: "Install without checking for previously installed keg-only or "\
"non-migrated versions." "non-migrated versions."
switch :verbose, switch :verbose,

View File

@ -21,7 +21,7 @@ module Homebrew
switch "-n", "--dry-run", switch "-n", "--dry-run",
description: "List files which would be linked or deleted by "\ description: "List files which would be linked or deleted by "\
"`brew link --overwrite` without actually linking or deleting any files." "`brew link --overwrite` without actually linking or deleting any files."
switch :force, switch "-f", "--force",
description: "Allow keg-only formulae to be linked." description: "Allow keg-only formulae to be linked."
switch :verbose switch :verbose
switch :debug switch :debug

View File

@ -14,7 +14,7 @@ module Homebrew
Migrate renamed packages to new names, where <formula> are old names of Migrate renamed packages to new names, where <formula> are old names of
packages. packages.
EOS EOS
switch :force, switch "-f", "--force",
description: "Treat installed <formula> and provided <formula> as if they are from "\ description: "Treat installed <formula> and provided <formula> as if they are from "\
"the same taps and migrate them anyway." "the same taps and migrate them anyway."
switch :verbose switch :verbose

View File

@ -14,7 +14,6 @@ module Homebrew
Rerun the post-install steps for <formula>. Rerun the post-install steps for <formula>.
EOS EOS
switch :force
switch :verbose switch :verbose
switch :debug switch :debug
min_named :keg min_named :keg
@ -27,7 +26,6 @@ module Homebrew
args.resolved_formulae.each do |f| args.resolved_formulae.each do |f|
ohai "Postinstalling #{f}" ohai "Postinstalling #{f}"
fi = FormulaInstaller.new(f) fi = FormulaInstaller.new(f)
fi.force = args.force?
fi.post_install fi.post_install
end end
end end

View File

@ -39,7 +39,7 @@ module Homebrew
"macOS, even if it would not normally be used for installation." "macOS, even if it would not normally be used for installation."
switch "--keep-tmp", switch "--keep-tmp",
description: "Retain the temporary files created during installation." description: "Retain the temporary files created during installation."
switch :force, switch "-f", "--force",
description: "Install without checking for previously installed keg-only or "\ description: "Install without checking for previously installed keg-only or "\
"non-migrated versions." "non-migrated versions."
switch :verbose, switch :verbose,

View File

@ -19,7 +19,7 @@ module Homebrew
Uninstall <formula>. Uninstall <formula>.
EOS EOS
switch :force, switch "-f", "--force",
description: "Delete all installed versions of <formula>." description: "Delete all installed versions of <formula>."
switch "--ignore-dependencies", switch "--ignore-dependencies",
description: "Don't fail uninstall, even if <formula> is a dependency of any installed "\ description: "Don't fail uninstall, even if <formula> is a dependency of any installed "\

View File

@ -27,7 +27,9 @@ module Homebrew
EOS EOS
switch "--preinstall", switch "--preinstall",
description: "Run in 'auto-update' mode (faster, less output)." description: "Run in 'auto-update' mode (faster, less output)."
switch :force switch "-f", "--force",
description: "Treat installed and updated formulae as if they are from "\
"the same taps and migrate them anyway."
switch :quiet switch :quiet
switch :verbose switch :verbose
switch :debug switch :debug

View File

@ -43,7 +43,7 @@ module Homebrew
description: "Set a successful exit status even if pinned formulae are not upgraded." description: "Set a successful exit status even if pinned formulae are not upgraded."
switch "--keep-tmp", switch "--keep-tmp",
description: "Retain the temporary files created during installation." description: "Retain the temporary files created during installation."
switch :force, switch "-f", "--force",
description: "Install without checking for previously installed keg-only or "\ description: "Install without checking for previously installed keg-only or "\
"non-migrated versions." "non-migrated versions."
switch :verbose, switch :verbose,

View File

@ -62,7 +62,8 @@ module Homebrew
flag "--revision=", flag "--revision=",
depends_on: "--tag=", depends_on: "--tag=",
description: "Specify the new git commit <revision> corresponding to the specified <tag>." description: "Specify the new git commit <revision> corresponding to the specified <tag>."
switch :force switch "-f", "--force",
description: "Ignore duplicate open PRs. Remove all mirrors if --mirror= was not specified."
switch :quiet switch :quiet
switch :verbose switch :verbose
switch :debug switch :debug

View File

@ -18,7 +18,6 @@ module Homebrew
description: "Print what would be done rather than doing it." description: "Print what would be done rather than doing it."
flag "--message=", flag "--message=",
description: "Append <message> to the default commit message." description: "Append <message> to the default commit message."
switch :force
switch :quiet switch :quiet
switch :verbose switch :verbose
switch :debug switch :debug
@ -27,7 +26,7 @@ module Homebrew
end end
def bump_revision def bump_revision
bump_revision_args.parse args = bump_revision_args.parse
# As this command is simplifying user-run commands then let's just use a # As this command is simplifying user-run commands then let's just use a
# user path, too. # user path, too.

View File

@ -53,7 +53,8 @@ module Homebrew
description: "Explicitly set the <license> of the new formula." description: "Explicitly set the <license> of the new formula."
flag "--tap=", flag "--tap=",
description: "Generate the new formula within the given tap, specified as <user>`/`<repo>." description: "Generate the new formula within the given tap, specified as <user>`/`<repo>."
switch :force switch "-f", "--force",
description: "Ignore errors for disallowed formula names and named that shadow aliases."
switch :verbose switch :verbose
switch :debug switch :debug
conflicts "--autotools", "--cmake", "--crystal", "--go", "--meson", "--node", "--perl", "--python", "--rust" conflicts "--autotools", "--cmake", "--crystal", "--go", "--meson", "--node", "--perl", "--python", "--rust"

View File

@ -89,7 +89,8 @@ module Homebrew
EOS EOS
flag "--version=", flag "--version=",
description: "Extract the specified <version> of <formula> instead of the most recent." description: "Extract the specified <version> of <formula> instead of the most recent."
switch :force switch "-f", "--force",
description: "Overwrite the destination formula if it already exists."
switch :debug switch :debug
named 2 named 2
end end

View File

@ -22,7 +22,8 @@ module Homebrew
switch "-g", "--git", switch "-g", "--git",
description: "Initialise a Git repository in the unpacked source. This is useful for creating "\ description: "Initialise a Git repository in the unpacked source. This is useful for creating "\
"patches for the software." "patches for the software."
switch :force switch "-f", "--force",
description: "Overwrite the destination directory if it already exists."
switch :verbose switch :verbose
switch :debug switch :debug
conflicts "--git", "--patch" conflicts "--git", "--patch"

View File

@ -753,6 +753,8 @@ uses.
Specify the new git commit *`tag`* for the formula. Specify the new git commit *`tag`* for the formula.
* `--revision`: * `--revision`:
Specify the new git commit *`revision`* corresponding to the specified *`tag`*. Specify the new git commit *`revision`* corresponding to the specified *`tag`*.
* `-f`, `--force`:
Ignore duplicate open PRs. Remove all mirrors if --mirror= was not specified.
### `bump-revision` [*`options`*] *`formula`* ### `bump-revision` [*`options`*] *`formula`*
@ -811,6 +813,8 @@ a simple example. For the complete API, see: <https://rubydoc.brew.sh/Formula>
Explicitly set the *`license`* of the new formula. Explicitly set the *`license`* of the new formula.
* `--tap`: * `--tap`:
Generate the new formula within the given tap, specified as *`user`*`/`*`repo`*. Generate the new formula within the given tap, specified as *`user`*`/`*`repo`*.
* `-f`, `--force`:
Ignore errors for disallowed formula names and named that shadow aliases.
### `diy` [*`options`*] ### `diy` [*`options`*]
@ -838,6 +842,8 @@ formula from a tap that is not `homebrew/core` use its fully-qualified form of
* `--version`: * `--version`:
Extract the specified *`version`* of *`formula`* instead of the most recent. Extract the specified *`version`* of *`formula`* instead of the most recent.
* `-f`, `--force`:
Overwrite the destination formula if it already exists.
### `formula` *`formula`* ### `formula` *`formula`*
@ -1057,6 +1063,8 @@ directory.
Patches for *`formula`* will be applied to the unpacked source. Patches for *`formula`* will be applied to the unpacked source.
* `-g`, `--git`: * `-g`, `--git`:
Initialise a Git repository in the unpacked source. This is useful for creating patches for the software. Initialise a Git repository in the unpacked source. This is useful for creating patches for the software.
* `-f`, `--force`:
Overwrite the destination directory if it already exists.
### `update-license-data` [*`options`*] ### `update-license-data` [*`options`*]
@ -1098,9 +1106,6 @@ These options are applicable across multiple subcommands.
* `-d`, `--debug`: * `-d`, `--debug`:
Display any debugging information. Display any debugging information.
* `-f`, `--force`:
Override warnings and enable potentially unsafe operations.
## OFFICIAL EXTERNAL COMMANDS ## OFFICIAL EXTERNAL COMMANDS
### `cask` *`subcommand`* ### `cask` *`subcommand`*

View File

@ -993,6 +993,10 @@ Specify the new git commit \fItag\fR for the formula\.
\fB\-\-revision\fR \fB\-\-revision\fR
Specify the new git commit \fIrevision\fR corresponding to the specified \fItag\fR\. Specify the new git commit \fIrevision\fR corresponding to the specified \fItag\fR\.
. .
.TP
\fB\-f\fR, \fB\-\-force\fR
Ignore duplicate open PRs\. Remove all mirrors if \-\-mirror= was not specified\.
.
.SS "\fBbump\-revision\fR [\fIoptions\fR] \fIformula\fR" .SS "\fBbump\-revision\fR [\fIoptions\fR] \fIformula\fR"
Create a commit to increment the revision of \fIformula\fR\. If no revision is present, "revision 1" will be added\. Create a commit to increment the revision of \fIformula\fR\. If no revision is present, "revision 1" will be added\.
. .
@ -1077,6 +1081,10 @@ Explicitly set the \fIlicense\fR of the new formula\.
\fB\-\-tap\fR \fB\-\-tap\fR
Generate the new formula within the given tap, specified as \fIuser\fR\fB/\fR\fIrepo\fR\. Generate the new formula within the given tap, specified as \fIuser\fR\fB/\fR\fIrepo\fR\.
. .
.TP
\fB\-f\fR, \fB\-\-force\fR
Ignore errors for disallowed formula names and named that shadow aliases\.
.
.SS "\fBdiy\fR [\fIoptions\fR]" .SS "\fBdiy\fR [\fIoptions\fR]"
Automatically determine the installation prefix for non\-Homebrew software\. Using the output from this command, you can install your own software into the Cellar and then link it into Homebrew\'s prefix with \fBbrew link\fR\. Automatically determine the installation prefix for non\-Homebrew software\. Using the output from this command, you can install your own software into the Cellar and then link it into Homebrew\'s prefix with \fBbrew link\fR\.
. .
@ -1098,6 +1106,10 @@ Look through repository history to find the most recent version of \fIformula\fR
\fB\-\-version\fR \fB\-\-version\fR
Extract the specified \fIversion\fR of \fIformula\fR instead of the most recent\. Extract the specified \fIversion\fR of \fIformula\fR instead of the most recent\.
. .
.TP
\fB\-f\fR, \fB\-\-force\fR
Overwrite the destination formula if it already exists\.
.
.SS "\fBformula\fR \fIformula\fR" .SS "\fBformula\fR \fIformula\fR"
Display the path where \fIformula\fR is located\. Display the path where \fIformula\fR is located\.
. .
@ -1377,6 +1389,10 @@ Patches for \fIformula\fR will be applied to the unpacked source\.
\fB\-g\fR, \fB\-\-git\fR \fB\-g\fR, \fB\-\-git\fR
Initialise a Git repository in the unpacked source\. This is useful for creating patches for the software\. Initialise a Git repository in the unpacked source\. This is useful for creating patches for the software\.
. .
.TP
\fB\-f\fR, \fB\-\-force\fR
Overwrite the destination directory if it already exists\.
.
.SS "\fBupdate\-license\-data\fR [\fIoptions\fR]" .SS "\fBupdate\-license\-data\fR [\fIoptions\fR]"
Update SPDX license data in the Homebrew repository\. Update SPDX license data in the Homebrew repository\.
. .
@ -1425,10 +1441,6 @@ Make some output more verbose\.
\fB\-d\fR, \fB\-\-debug\fR \fB\-d\fR, \fB\-\-debug\fR
Display any debugging information\. Display any debugging information\.
. .
.TP
\fB\-f\fR, \fB\-\-force\fR
Override warnings and enable potentially unsafe operations\.
.
.SH "OFFICIAL EXTERNAL COMMANDS" .SH "OFFICIAL EXTERNAL COMMANDS"
. .
.SS "\fBcask\fR \fIsubcommand\fR" .SS "\fBcask\fR \fIsubcommand\fR"