diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 99f48d546c..e1cdfd8daa 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -90,6 +90,10 @@ class FormulaInstaller install_dependencies end + if ARGV.build_bottle? && (arch = ARGV.bottle_arch) && !Hardware::CPU.optimization_flags.include?(arch) + raise "Unrecognized architecture for --bottle-arch: #{arch}" + end + oh1 "Installing #{Tty.green}#{f}#{Tty.reset}" if show_header @@attempted << f