Merge pull request #10197 from carlocab/bottle-error

formula_installer: tweak bottle error message
This commit is contained in:
Mike McQuaid 2021-01-05 09:42:31 +00:00 committed by GitHub
commit a805a5ea16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -242,14 +242,18 @@ class FormulaInstaller
# Integration tests override homebrew-core locations # Integration tests override homebrew-core locations
ENV["HOMEBREW_TEST_TMPDIR"].nil? && ENV["HOMEBREW_TEST_TMPDIR"].nil? &&
!pour_bottle? !pour_bottle?
message = <<~EOS message = if !formula.pour_bottle? && formula.pour_bottle_check_unsatisfied_reason
#{formula}: no bottle available! formula_message = formula.pour_bottle_check_unsatisfied_reason
EOS formula_message[0] = formula_message[0].downcase
if !formula.pour_bottle? && formula.pour_bottle_check_unsatisfied_reason
message += formula.pour_bottle_check_unsatisfied_reason "#{formula}: #{formula_message}"
else
<<~EOS
#{formula}: no bottle available!
EOS
end end
message += <<~EOS message += <<~EOS
You can try to install from source with e.g. You can try to install from source with:
brew install --build-from-source #{formula} brew install --build-from-source #{formula}
Please note building from source is unsupported. You will encounter build Please note building from source is unsupported. You will encounter build
failures with some formulae. If you experience any issues please create pull failures with some formulae. If you experience any issues please create pull