formula_installer: refactor source build messages.
This commit is contained in:
parent
4db1c1a00f
commit
7fd716ff66
@ -231,12 +231,21 @@ class FormulaInstaller
|
|||||||
raise CannotInstallFormulaError, "--force-bottle passed but #{formula.full_name} has no bottle!"
|
raise CannotInstallFormulaError, "--force-bottle passed but #{formula.full_name} has no bottle!"
|
||||||
end
|
end
|
||||||
|
|
||||||
if Hardware::CPU.arm? && !pour_bottle? && !formula.bottle_unneeded? && !build_from_source? && !build_bottle? && !formula.bottle_disabled?
|
if Homebrew.default_prefix? && !Homebrew::EnvConfig.developer? &&
|
||||||
# During the first stage of ARM support, we bail out unless there is a bottle or the user specifically asked to build from source
|
!build_from_source? && !build_bottle? &&
|
||||||
onoe "There is no prebuilt bottle available for #{formula.full_name} on ARM macOS yet"
|
formula.tap&.core_tap? && !formula.bottle_unneeded? &&
|
||||||
onoe "You can try to install it from source with the --build-from-source flag (or -s)"
|
# Integration tests override homebrew-core locations
|
||||||
onoe "However, this means we can offer no support."
|
ENV["HOMEBREW_TEST_TMPDIR"].nil? &&
|
||||||
raise CannotInstallFormulaError, "no bottle is available for #{formula.full_name} on ARM macOS yet"
|
!pour_bottle?
|
||||||
|
raise CannotInstallFormulaError, <<~EOS
|
||||||
|
#{formula}: no bottle available!
|
||||||
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
type, reason = DeprecateDisable.deprecate_disable_info formula
|
type, reason = DeprecateDisable.deprecate_disable_info formula
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user