diff options
| author | Jack Nagel | 2014-03-13 10:10:59 -0500 | 
|---|---|---|
| committer | Jack Nagel | 2014-03-13 15:59:53 -0500 | 
| commit | 7c62275e1394eacc22b0abe8073a35d610d9fd1e (patch) | |
| tree | b318297bb1c8a484577e5c05b1104e8ba1de0f79 /Library | |
| parent | 60caf14ce2ba6846780e9a1d711af53b299ee82b (diff) | |
| download | brew-7c62275e1394eacc22b0abe8073a35d610d9fd1e.tar.bz2 | |
Whitelist arguments that are passed to build process
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula_installer.rb | 22 | 
1 files changed, 19 insertions, 3 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb index 28052b9be..8282cda73 100644 --- a/Library/Homebrew/formula_installer.rb +++ b/Library/Homebrew/formula_installer.rb @@ -411,9 +411,25 @@ class FormulaInstaller    end    def sanitized_ARGV_options -    args = ARGV.options_only -    args.delete "--ignore-dependencies" unless ignore_deps -    args.delete "--build-bottle" unless build_bottle +    args = [] +    args << "--ignore-dependencies" if ignore_deps + +    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    end  | 
