From 2dedca337eee15737adf282f5748896ea5171d7f Mon Sep 17 00:00:00 2001 From: carlocab <30379873+carlocab@users.noreply.github.com> Date: Wed, 30 Dec 2020 14:11:45 +0000 Subject: [PATCH 1/2] formula_installer: improve no-bottle error message Closes #10180. --- Library/Homebrew/formula_installer.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 1db18045bc..9a621a7428 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -242,8 +242,13 @@ class FormulaInstaller # Integration tests override homebrew-core locations ENV["HOMEBREW_TEST_TMPDIR"].nil? && !pour_bottle? - raise CannotInstallFormulaError, <<~EOS - #{formula}: no bottle available! + message = <<~EOS + #{formula}: unable to pour bottle! + EOS + if !formula.pour_bottle? && formula.pour_bottle_check_unsatisfied_reason + message += formula.pour_bottle_check_unsatisfied_reason + end + message += <<~EOS You can try to install from source with e.g. brew install --build-from-source #{formula} Please note building from source is unsupported. You will encounter build @@ -251,6 +256,7 @@ class FormulaInstaller requests instead of asking for help on Homebrew's GitHub, Twitter or any other official channels. EOS + raise CannotInstallFormulaError, message end type, reason = DeprecateDisable.deprecate_disable_info formula From cc50307aca4ec4d899714d65d5796cfa8b1db8cd Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Thu, 31 Dec 2020 13:09:35 +0000 Subject: [PATCH 2/2] formula_installer: use existing no bottle text. --- Library/Homebrew/formula_installer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 9a621a7428..ad3036938e 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -243,7 +243,7 @@ class FormulaInstaller ENV["HOMEBREW_TEST_TMPDIR"].nil? && !pour_bottle? message = <<~EOS - #{formula}: unable to pour bottle! + #{formula}: no bottle available! EOS if !formula.pour_bottle? && formula.pour_bottle_check_unsatisfied_reason message += formula.pour_bottle_check_unsatisfied_reason