formula_installer: don't automatically upgrade from another tap.

Rather than automatically upgrading a formula from one tap to a formula
from another when specified as a dependency require a manual
intervention to be clear that's the user's intention.
This commit is contained in:
Mike McQuaid 2018-11-10 12:04:26 +00:00
parent a8aed381ca
commit 50c9670605
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70

View File

@ -568,6 +568,14 @@ class FormulaInstaller
installed_keg.rename(tmp_keg)
end
tab_tap = tab.source["tap"]
if df.tap.to_s != tab_tap
odie <<~EOS
#{df} is already installed from #{tab_tap}!
Please `brew uninstall #{df}` first."
EOS
end
fi = FormulaInstaller.new(df)
fi.options |= tab.used_options
fi.options |= Tab.remap_deprecated_options(df.deprecated_options, dep.options)