diff --git a/Library/Homebrew/cli/parser.rb b/Library/Homebrew/cli/parser.rb index e48cafab0167d31790004e06190595e03ca59380..dafa7a59d2218fd2397bf1be676853eded7e0b20 100644 --- a/Library/Homebrew/cli/parser.rb +++ b/Library/Homebrew/cli/parser.rb @@ -34,7 +34,6 @@ module Homebrew quiet: [["-q", "--quiet"], :quiet, "Suppress any warnings."], verbose: [["-v", "--verbose"], :verbose, "Make some output more verbose."], debug: [["-d", "--debug"], :debug, "Display any debugging information."], - force: [["-f", "--force"], :force, "Override warnings and enable potentially unsafe operations."], } end diff --git a/Library/Homebrew/cmd/fetch.rb b/Library/Homebrew/cmd/fetch.rb index 362af7506a31d4f900585baf462e1d06c61806fa..e0dab2af9587d8f65af92d69ef681034563d8d6f 100644 --- a/Library/Homebrew/cmd/fetch.rb +++ b/Library/Homebrew/cmd/fetch.rb @@ -21,7 +21,7 @@ module Homebrew description: "Fetch HEAD version instead of stable version." switch "--devel", description: "Fetch development version instead of stable version." - switch :force, + switch "-f", "--force", description: "Remove a previously cached version and re-fetch." switch :verbose, description: "Do a verbose VCS checkout, if the URL represents a VCS. This is useful for "\ diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index 34c33d71fa5bbb2026c832960f3cb9cc5c44783c..7725ef1a1124dd72874ec767801df26642ffbc02 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -71,7 +71,7 @@ module Homebrew depends_on: "--build-bottle", description: "Optimise bottles for the specified architecture rather than the oldest "\ "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 "\ "non-migrated versions." switch :verbose, diff --git a/Library/Homebrew/cmd/link.rb b/Library/Homebrew/cmd/link.rb index 9cb622dacfecadacf22ff7153d8673460ca61918..441cf1de1d4f57d32ae114b01b65620dae4e0922 100644 --- a/Library/Homebrew/cmd/link.rb +++ b/Library/Homebrew/cmd/link.rb @@ -21,7 +21,7 @@ module Homebrew switch "-n", "--dry-run", description: "List files which would be linked or deleted by "\ "`brew link --overwrite` without actually linking or deleting any files." - switch :force, + switch "-f", "--force", description: "Allow keg-only formulae to be linked." switch :verbose switch :debug diff --git a/Library/Homebrew/cmd/migrate.rb b/Library/Homebrew/cmd/migrate.rb index e7d285479af19dbd7bbf40fe2b60b26a41de4750..55dde865132e6a15c4f13da1fa333c31b3c8f3cf 100644 --- a/Library/Homebrew/cmd/migrate.rb +++ b/Library/Homebrew/cmd/migrate.rb @@ -14,7 +14,7 @@ module Homebrew Migrate renamed packages to new names, where <formula> are old names of packages. EOS - switch :force, + switch "-f", "--force", description: "Treat installed <formula> and provided <formula> as if they are from "\ "the same taps and migrate them anyway." switch :verbose diff --git a/Library/Homebrew/cmd/postinstall.rb b/Library/Homebrew/cmd/postinstall.rb index 89e3adf7363894f539b8c7d6a19718e73b50e8c3..762a97eb47d2e5b1000ef181d5d78d2ad3750b35 100644 --- a/Library/Homebrew/cmd/postinstall.rb +++ b/Library/Homebrew/cmd/postinstall.rb @@ -14,7 +14,6 @@ module Homebrew Rerun the post-install steps for <formula>. EOS - switch :force switch :verbose switch :debug min_named :keg @@ -27,7 +26,6 @@ module Homebrew args.resolved_formulae.each do |f| ohai "Postinstalling #{f}" fi = FormulaInstaller.new(f) - fi.force = args.force? fi.post_install end end diff --git a/Library/Homebrew/cmd/reinstall.rb b/Library/Homebrew/cmd/reinstall.rb index 7a732f7d01722feda1f8d9bbdcba103df74442a2..2aca9cb7cd82824358ebf5d2dce65ca0f9f278dc 100644 --- a/Library/Homebrew/cmd/reinstall.rb +++ b/Library/Homebrew/cmd/reinstall.rb @@ -39,7 +39,7 @@ module Homebrew "macOS, even if it would not normally be used for installation." switch "--keep-tmp", description: "Retain the temporary files created during installation." - switch :force, + switch "-f", "--force", description: "Install without checking for previously installed keg-only or "\ "non-migrated versions." switch :verbose, diff --git a/Library/Homebrew/cmd/uninstall.rb b/Library/Homebrew/cmd/uninstall.rb index 2cb101b2961f62400da6af2f168ce52a568319fe..64b59a65d4573ad763fb957dafe8c45a4bb0bb22 100644 --- a/Library/Homebrew/cmd/uninstall.rb +++ b/Library/Homebrew/cmd/uninstall.rb @@ -19,7 +19,7 @@ module Homebrew Uninstall <formula>. EOS - switch :force, + switch "-f", "--force", description: "Delete all installed versions of <formula>." switch "--ignore-dependencies", description: "Don't fail uninstall, even if <formula> is a dependency of any installed "\ diff --git a/Library/Homebrew/cmd/update-report.rb b/Library/Homebrew/cmd/update-report.rb index 6b0d8428275c554cc46ca40571888362ed9a6a13..587af6639293b1d9b8af9e379b179710b06716a2 100644 --- a/Library/Homebrew/cmd/update-report.rb +++ b/Library/Homebrew/cmd/update-report.rb @@ -27,7 +27,9 @@ module Homebrew EOS switch "--preinstall", 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 :verbose switch :debug diff --git a/Library/Homebrew/cmd/upgrade.rb b/Library/Homebrew/cmd/upgrade.rb index ddc8acc73ab0bae170fea9dc45921cf51826ca27..8eccc812b4451d7d7ab15fc43436cf56059b1a1a 100644 --- a/Library/Homebrew/cmd/upgrade.rb +++ b/Library/Homebrew/cmd/upgrade.rb @@ -43,7 +43,7 @@ module Homebrew description: "Set a successful exit status even if pinned formulae are not upgraded." switch "--keep-tmp", description: "Retain the temporary files created during installation." - switch :force, + switch "-f", "--force", description: "Install without checking for previously installed keg-only or "\ "non-migrated versions." switch :verbose, diff --git a/Library/Homebrew/dev-cmd/bump-formula-pr.rb b/Library/Homebrew/dev-cmd/bump-formula-pr.rb index f70c846d1a2c3d312cc9499967f32b1b2b189997..5fe50eb2bcdabd15c8dd5b190a224b2f65868473 100644 --- a/Library/Homebrew/dev-cmd/bump-formula-pr.rb +++ b/Library/Homebrew/dev-cmd/bump-formula-pr.rb @@ -62,7 +62,8 @@ module Homebrew flag "--revision=", depends_on: "--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 :verbose switch :debug diff --git a/Library/Homebrew/dev-cmd/bump-revision.rb b/Library/Homebrew/dev-cmd/bump-revision.rb index 131edb3bdab5ce8ee6c976f32b8dc05d8a08ed5f..0575cfa4a8318b3093bea27d920f9f99a4839dd9 100644 --- a/Library/Homebrew/dev-cmd/bump-revision.rb +++ b/Library/Homebrew/dev-cmd/bump-revision.rb @@ -18,7 +18,6 @@ module Homebrew description: "Print what would be done rather than doing it." flag "--message=", description: "Append <message> to the default commit message." - switch :force switch :quiet switch :verbose switch :debug @@ -27,7 +26,7 @@ module Homebrew end 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 # user path, too. diff --git a/Library/Homebrew/dev-cmd/create.rb b/Library/Homebrew/dev-cmd/create.rb index 3c22558c2777a2ae718b30d332dd8ba93770b8c7..c14ffaf3dad0df95850f0931256a6ef625a6fc6f 100644 --- a/Library/Homebrew/dev-cmd/create.rb +++ b/Library/Homebrew/dev-cmd/create.rb @@ -53,7 +53,8 @@ module Homebrew description: "Explicitly set the <license> of the new formula." flag "--tap=", 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 :debug conflicts "--autotools", "--cmake", "--crystal", "--go", "--meson", "--node", "--perl", "--python", "--rust" diff --git a/Library/Homebrew/dev-cmd/extract.rb b/Library/Homebrew/dev-cmd/extract.rb index d7d11b0233fa50a36aa4377a99518e68c3292b17..7bc6e9e3221f0f6d3fb3df6346db51135b7e7052 100644 --- a/Library/Homebrew/dev-cmd/extract.rb +++ b/Library/Homebrew/dev-cmd/extract.rb @@ -89,7 +89,8 @@ module Homebrew EOS flag "--version=", 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 named 2 end diff --git a/Library/Homebrew/dev-cmd/unpack.rb b/Library/Homebrew/dev-cmd/unpack.rb index 2aeaaf54ce12323d7bc9c1b81dc2f2ff74376405..1f1360bc25d843ce74d522409b49df64443e4ded 100644 --- a/Library/Homebrew/dev-cmd/unpack.rb +++ b/Library/Homebrew/dev-cmd/unpack.rb @@ -22,7 +22,8 @@ module Homebrew switch "-g", "--git", description: "Initialise a Git repository in the unpacked source. This is useful for creating "\ "patches for the software." - switch :force + switch "-f", "--force", + description: "Overwrite the destination directory if it already exists." switch :verbose switch :debug conflicts "--git", "--patch" diff --git a/docs/Manpage.md b/docs/Manpage.md index c9df04b5fd8ea7b216d7297239fcd24ac0a29219..2fa388e7f9e0753cec8116cf655cf55aa3e0a4a6 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -753,6 +753,8 @@ uses. Specify the new git commit *`tag`* for the formula. * `--revision`: 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`* @@ -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. * `--tap`: 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`*] @@ -838,6 +842,8 @@ formula from a tap that is not `homebrew/core` use its fully-qualified form of * `--version`: Extract the specified *`version`* of *`formula`* instead of the most recent. +* `-f`, `--force`: + Overwrite the destination formula if it already exists. ### `formula` *`formula`* @@ -1057,6 +1063,8 @@ directory. Patches for *`formula`* will be applied to the unpacked source. * `-g`, `--git`: 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`*] @@ -1098,9 +1106,6 @@ These options are applicable across multiple subcommands. * `-d`, `--debug`: Display any debugging information. -* `-f`, `--force`: - Override warnings and enable potentially unsafe operations. - ## OFFICIAL EXTERNAL COMMANDS ### `cask` *`subcommand`* diff --git a/manpages/brew.1 b/manpages/brew.1 index 6f0ad711f6ea83f02f46aca1b39e47b36538c866..122d4a4a2d08da85ba7d5c1bb3939dd4e80ad81c 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -993,6 +993,10 @@ Specify the new git commit \fItag\fR for the formula\. \fB\-\-revision\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" 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 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]" 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 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" 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 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]" Update SPDX license data in the Homebrew repository\. . @@ -1425,10 +1441,6 @@ Make some output more verbose\. \fB\-d\fR, \fB\-\-debug\fR Display any debugging information\. . -.TP -\fB\-f\fR, \fB\-\-force\fR -Override warnings and enable potentially unsafe operations\. -. .SH "OFFICIAL EXTERNAL COMMANDS" . .SS "\fBcask\fR \fIsubcommand\fR"