diff options
Diffstat (limited to 'Library/Homebrew/extend/ARGV.rb')
| -rw-r--r-- | Library/Homebrew/extend/ARGV.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Library/Homebrew/extend/ARGV.rb b/Library/Homebrew/extend/ARGV.rb index eec2172a2..bb26d453f 100644 --- a/Library/Homebrew/extend/ARGV.rb +++ b/Library/Homebrew/extend/ARGV.rb @@ -185,7 +185,19 @@ module HomebrewArgvExtension end def build_from_source? - switch?("s") || include?("--build-from-source") || !!ENV["HOMEBREW_BUILD_FROM_SOURCE"] + switch?("s") || include?("--build-from-source") + end + + def build_all_from_source? + !!ENV["HOMEBREW_BUILD_FROM_SOURCE"] + end + + # Whether a given formula should be built from source during the current + # installation run. + def build_formula_from_source?(f) + return true if build_all_from_source? + return false unless (build_from_source? || build_bottle?) + formulae.any? { |argv_f| argv_f.full_name == f.full_name } end def flag?(flag) |
