aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-04-26 19:09:49 -0500
committerJack Nagel2014-04-26 19:10:21 -0500
commit070bdc59b9953fa1b92fdc8dcc8e0400dcdba181 (patch)
tree58660626ccfbedd0cbe5b33ebccb7c620a49a212 /Library
parentbdee729a41fbaec0607f26749cc09730792ec77e (diff)
downloadbrew-070bdc59b9953fa1b92fdc8dcc8e0400dcdba181.tar.bz2
Explicitly pass key-value options to the build process
Fixes Homebrew/homebrew#28695.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula_installer.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index c8847eb08..21c3115d2 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -481,6 +481,13 @@ class FormulaInstaller
args << "--env=#{ARGV.env}" if ARGV.env
args << "--HEAD" if ARGV.build_head?
args << "--devel" if ARGV.build_devel?
+
+ f.build.each do |opt, _|
+ name = opt.name[/\A(.+)=\z$/, 1]
+ value = ARGV.value(name)
+ args << "--#{name}=#{value}" if name && value
+ end
+
args
end