aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/install.rb6
-rw-r--r--Library/Homebrew/cmd/reinstall.rb8
-rw-r--r--Library/Homebrew/cmd/upgrade.rb8
3 files changed, 3 insertions, 19 deletions
diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb
index ce9bf5291..f41450be1 100644
--- a/Library/Homebrew/cmd/install.rb
+++ b/Library/Homebrew/cmd/install.rb
@@ -40,11 +40,7 @@ module Homebrew
# if the user's flags will prevent bottle only-installations when no
# developer tools are available, we need to stop them early on
- if !MacOS.can_build?
- bf = ARGV.collect_build_flags
-
- raise BuildFlagsError.new(bf) if !bf.empty?
- end
+ FormulaInstaller.prevent_build_flags unless MacOS.can_build?
ARGV.formulae.each do |f|
# head-only without --HEAD is an error
diff --git a/Library/Homebrew/cmd/reinstall.rb b/Library/Homebrew/cmd/reinstall.rb
index 98941698a..4de1ad9c2 100644
--- a/Library/Homebrew/cmd/reinstall.rb
+++ b/Library/Homebrew/cmd/reinstall.rb
@@ -2,13 +2,7 @@ require "formula_installer"
module Homebrew
def reinstall
- if !MacOS.can_build?
- bf = ARGV.collect_build_flags
-
- if !bf.empty?
- raise BuildFlagsError.new(bf)
- end
- end
+ FormulaInstaller.prevent_build_flags unless MacOS.can_build?
ARGV.resolved_formulae.each { |f| reinstall_formula(f) }
end
diff --git a/Library/Homebrew/cmd/upgrade.rb b/Library/Homebrew/cmd/upgrade.rb
index e8fc9c0f8..9bb5d46ad 100644
--- a/Library/Homebrew/cmd/upgrade.rb
+++ b/Library/Homebrew/cmd/upgrade.rb
@@ -3,13 +3,7 @@ require "cmd/outdated"
module Homebrew
def upgrade
- if !MacOS.can_build?
- bf = ARGV.collect_build_flags
-
- if !bf.empty?
- raise BuildFlagsError.new(bf)
- end
- end
+ FormulaInstaller.prevent_build_flags unless MacOS.can_build?
Homebrew.perform_preinstall_checks