Eliminate a place where ARGV is mutated

This commit is contained in:
Jack Nagel 2015-04-16 20:33:32 -04:00
parent ced7598d67
commit c2dcd91bd1
2 changed files with 6 additions and 9 deletions

View File

@ -36,13 +36,6 @@ class Build
end
end
def pre_superenv_hacks
# Allow a formula to opt-in to the std environment.
if (formula.env.std? || deps.any? { |d| d.name == "scons" }) && ARGV.env != "super"
ARGV.unshift "--env=std"
end
end
def effective_build_options_for(dependent)
args = dependent.build.used_options
args |= Tab.for_formula(dependent).used_options
@ -83,7 +76,6 @@ class Build
fixopt(dep) unless dep.opt_prefix.directory?
end
pre_superenv_hacks
ENV.activate_extensions!
if superenv?

View File

@ -435,7 +435,12 @@ class FormulaInstaller
args << "--verbose" if verbose?
args << "--debug" if debug?
args << "--cc=#{ARGV.cc}" if ARGV.cc
args << "--env=#{ARGV.env}" if ARGV.env
if ARGV.env
args << "--env=#{ARGV.env}"
elsif formula.env.std? || formula.recursive_dependencies.any? { |d| d.name == "scons" }
args << "--env=std"
end
if formula.head?
args << "--HEAD"