aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/build_options.rb
diff options
context:
space:
mode:
authorMike McQuaid2016-11-14 09:28:28 +0000
committerMike McQuaid2016-11-14 09:28:28 +0000
commitcc3bf7bcb58f2d794dfa8981ea488c55ea415164 (patch)
tree9d18300cdfbc0516e2ff94201f19d7f0abe50d7c /Library/Homebrew/build_options.rb
parent5294b99d6fa28b972ee4d695bda438bbf9e18647 (diff)
downloadbrew-cc3bf7bcb58f2d794dfa8981ea488c55ea415164.tar.bz2
Don't warn about unused `brew install` arguments.
This is a step closer to better argument handling but for now just fixes the issue in #1217 where it starts complaining about options like `--build-from-source` being used.
Diffstat (limited to 'Library/Homebrew/build_options.rb')
-rw-r--r--Library/Homebrew/build_options.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/Library/Homebrew/build_options.rb b/Library/Homebrew/build_options.rb
index edcae01f5..44b6440dc 100644
--- a/Library/Homebrew/build_options.rb
+++ b/Library/Homebrew/build_options.rb
@@ -103,7 +103,7 @@ class BuildOptions
# @private
def invalid_options
- @args - @options
+ @args - @options - BuildOptions.formula_install_options
end
# @private
@@ -111,6 +111,12 @@ class BuildOptions
invalid_options.map(&:flag).sort
end
+ def self.formula_install_options
+ @formula_install_options ||= ARGV.formula_install_option_names.map do |option_name|
+ Option.new option_name[2..-1]
+ end
+ end
+
private
def option_defined?(name)