From a4838d22f4cd9b078a6cf641753caef562071386 Mon Sep 17 00:00:00 2001 From: Shaun Jackman Date: Sat, 30 Sep 2017 18:23:48 -0700 Subject: [PATCH] pour_bottle?: Check bottle.compatible_cellar? formula.bottled? is false when the bottle has no sha256, as with a local bottle. --- Library/Homebrew/formula_installer.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 845152e24d..56238ad734 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -100,11 +100,12 @@ class FormulaInstaller return false end - unless formula.bottled? + bottle = formula.bottle_specification + unless bottle.compatible_cellar? if install_bottle_options[:warn] opoo <<-EOS.undent Building #{formula.full_name} from source: - The bottle needs a #{formula.bottle_specification.cellar} Cellar (yours is #{HOMEBREW_CELLAR}). + The bottle needs a #{bottle.cellar} Cellar (yours is #{HOMEBREW_CELLAR}). EOS end return false