Fix install --force-bottle for non-standard prefix

Fix the error:
Error: undefined method `stage' for nil:NilClass
formula_installer.rb:1132:in `block in pour'
This commit is contained in:
Shaun Jackman 2020-12-15 00:04:36 -08:00
parent 26a59c9c92
commit 33483e9478

View File

@ -347,7 +347,7 @@ class FormulaInstaller
# Warn if a more recent version of this formula is available in the tap.
begin
if formula.pkg_version < (v = Formulary.factory(formula.full_name).pkg_version)
if formula.pkg_version < (v = Formulary.factory(formula.full_name, force_bottle: force_bottle?).pkg_version)
opoo "#{formula.full_name} #{v} is available and more recent than version #{formula.pkg_version}."
end
rescue FormulaUnavailableError