aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorJack Nagel2015-04-16 20:33:32 -0400
committerJack Nagel2015-04-16 22:20:59 -0400
commit61152c7d8d79e5e292994bdb554b4ad53d01054a (patch)
tree648c6e7288da72aa0cf49393b5f808348b437039 /Library/Homebrew
parent09fdce7318b676eb9005d3001d00f524f8619582 (diff)
downloadhomebrew-61152c7d8d79e5e292994bdb554b4ad53d01054a.tar.bz2
Eliminate a place where ARGV is mutated
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/build.rb8
-rw-r--r--Library/Homebrew/formula_installer.rb7
2 files changed, 6 insertions, 9 deletions
diff --git a/Library/Homebrew/build.rb b/Library/Homebrew/build.rb
index b69055e1e..0aa809934 100644
--- a/Library/Homebrew/build.rb
+++ b/Library/Homebrew/build.rb
@@ -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?
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index efd15d47d..3113810af 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -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"