Merge pull request #9483 from Homebrew/revert-9422-untap-force
Revert "untap: add --force switch"
This commit is contained in:
commit
23fccdb380
@ -2,7 +2,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require "cli/parser"
|
||||
require "formula"
|
||||
|
||||
module Homebrew
|
||||
extend T::Sig
|
||||
@ -17,8 +16,6 @@ module Homebrew
|
||||
|
||||
Remove a tapped formula repository.
|
||||
EOS
|
||||
switch "-f", "--force",
|
||||
description: "Untap even if formulae or casks from this tap are currently installed."
|
||||
|
||||
min_named 1
|
||||
end
|
||||
@ -31,23 +28,6 @@ module Homebrew
|
||||
tap = Tap.fetch(tapname)
|
||||
odie "Untapping #{tap} is not allowed" if tap.core_tap?
|
||||
|
||||
installed_tap_formulae = Formula.installed.select { |formula| formula.tap == tap }
|
||||
installed_tap_casks = Cask::Caskroom.casks.select { |cask| cask.tap == tap }
|
||||
|
||||
if installed_tap_formulae.length.positive? || installed_tap_casks.length.positive?
|
||||
if args.force?
|
||||
opoo <<~EOS
|
||||
Untapping #{tap} even though it contains the following installed formulae or casks:
|
||||
#{(installed_tap_formulae + installed_tap_casks.map(&:token)).join("\n")}
|
||||
EOS
|
||||
else
|
||||
odie <<~EOS
|
||||
Refusing to untap #{tap} because it contains the following installed formulae or casks:
|
||||
#{(installed_tap_formulae + installed_tap_casks.map(&:token)).join("\n")}
|
||||
EOS
|
||||
end
|
||||
end
|
||||
|
||||
tap.uninstall
|
||||
end
|
||||
end
|
||||
|
@ -572,9 +572,6 @@ See also `pin`.
|
||||
|
||||
Remove a tapped formula repository.
|
||||
|
||||
* `-f`, `--force`:
|
||||
Untap even if formulae or casks from this tap are currently installed.
|
||||
|
||||
### `update` [*`options`*]
|
||||
|
||||
Fetch the newest version of Homebrew and all formulae from GitHub using `git`(1) and perform any necessary migrations.
|
||||
|
@ -770,10 +770,6 @@ Unpin \fIformula\fR, allowing them to be upgraded by \fBbrew upgrade\fR \fIformu
|
||||
.SS "\fBuntap\fR \fItap\fR"
|
||||
Remove a tapped formula repository\.
|
||||
.
|
||||
.TP
|
||||
\fB\-f\fR, \fB\-\-force\fR
|
||||
Untap even if formulae or casks from this tap are currently installed\.
|
||||
.
|
||||
.SS "\fBupdate\fR [\fIoptions\fR]"
|
||||
Fetch the newest version of Homebrew and all formulae from GitHub using \fBgit\fR(1) and perform any necessary migrations\.
|
||||
.
|
||||
|
Loading…
x
Reference in New Issue
Block a user