Whitelist arguments that are passed to build process

This commit is contained in:
Jack Nagel 2014-03-13 10:10:59 -05:00
parent 60caf14ce2
commit 7c62275e13

View File

@ -411,9 +411,25 @@ class FormulaInstaller
end end
def sanitized_ARGV_options def sanitized_ARGV_options
args = ARGV.options_only args = []
args.delete "--ignore-dependencies" unless ignore_deps args << "--ignore-dependencies" if ignore_deps
args.delete "--build-bottle" unless build_bottle
if build_bottle
args << "--build-bottle"
args << "--bottle-arch=#{ARGV.bottle_arch}" if ARGV.bottle_arch
end
if ARGV.interactive?
args << "--interactive"
args << "--git" if ARGV.flag? "--git"
end
args << "--verbose" if ARGV.verbose?
args << "--debug" if ARGV.debug?
args << "--cc=#{ARGV.cc}" if ARGV.cc
args << "--env=#{ARGV.env}" if ARGV.env
args << "--HEAD" if ARGV.build_head?
args << "--devel" if ARGV.build_devel?
args args
end end