Fix brew untap with HOMEBREW_INSTALL_FROM_API

This commit is contained in:
Rylan Polster 2021-10-28 17:13:34 -04:00
parent 95482c6767
commit 6db19212c6
No known key found for this signature in database
GPG Key ID: 46A744940CFF4D64

View File

@ -27,6 +27,7 @@ module Homebrew
args.named.to_installed_taps.each do |tap|
odie "Untapping #{tap} is not allowed" if tap.core_tap? && !Homebrew::EnvConfig.install_from_api?
if !Homebrew::EnvConfig.install_from_api? || (!tap.core_tap? && tap != "homebrew/cask")
installed_tap_formulae = Formula.installed.select { |formula| formula.tap == tap }
installed_tap_casks = Cask::Caskroom.casks.select { |cask| cask.tap == tap }
@ -44,6 +45,7 @@ module Homebrew
EOS
end
end
end
tap.uninstall manual: true
end