Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

formula_installer: improve no-bottle error message #10183

Merged
merged 2 commits into from Dec 31, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion Library/Homebrew/formula_installer.rb
Expand Up @@ -242,15 +242,21 @@ def check_install_sanity
# Integration tests override homebrew-core locations
ENV["HOMEBREW_TEST_TMPDIR"].nil? &&
!pour_bottle?
raise CannotInstallFormulaError, <<~EOS
message = <<~EOS
#{formula}: no bottle available!
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
failures with some formulae. If you experience any issues please create pull
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
Expand Down