pour_bottle?: Fix when formula.bottle is nil
formula.bottle is nil when bottle.compatible_cellar? is false. Use formula.bottle_specification.compatible_cellar? rather than formula.bottle.compatible_cellar?.
This commit is contained in:
parent
1e57445eca
commit
3ebf282269
@ -84,8 +84,7 @@ class FormulaInstaller
|
||||
|
||||
return false if @pour_failed
|
||||
|
||||
bottle = formula.bottle
|
||||
return false if !bottle && !formula.local_bottle_path
|
||||
return false if !formula.bottled? && !formula.local_bottle_path
|
||||
return true if force_bottle?
|
||||
return false if build_from_source? || build_bottle? || interactive?
|
||||
return false if ARGV.cc
|
||||
@ -101,11 +100,11 @@ class FormulaInstaller
|
||||
return false
|
||||
end
|
||||
|
||||
unless bottle.compatible_cellar?
|
||||
unless formula.bottled?
|
||||
if install_bottle_options[:warn]
|
||||
opoo <<-EOS.undent
|
||||
Building #{formula.full_name} from source:
|
||||
The bottle needs a #{bottle.cellar} Cellar (yours is #{HOMEBREW_CELLAR}).
|
||||
The bottle needs a #{formula.bottle_specification.cellar} Cellar (yours is #{HOMEBREW_CELLAR}).
|
||||
EOS
|
||||
end
|
||||
return false
|
||||
|
||||
@ -8,7 +8,7 @@ describe Homebrew::Hooks::Bottles do
|
||||
|
||||
let(:formula) do
|
||||
double(
|
||||
bottle: nil,
|
||||
bottled?: false,
|
||||
local_bottle_path: nil,
|
||||
bottle_disabled?: false,
|
||||
some_random_method: true,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user