aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-03-28 18:50:12 -0500
committerJack Nagel2014-03-28 19:04:05 -0500
commit203c69f9cf8b56f10af30f824aef3a2bb4dcdcaa (patch)
treefa03eec14a350bf116c80dfc6433ed4300289458 /Library
parent8a176cbbe5d3502df0becf2aa6617c071ac1eed2 (diff)
downloadhomebrew-203c69f9cf8b56f10af30f824aef3a2bb4dcdcaa.tar.bz2
Make ENV changes in the child so we don't have to roll them back
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 1f9c645d5..77c8c51de 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -558,7 +558,6 @@ class Formula
# Pretty titles the command and buffers stdout/stderr
# Throws if there's an error
def system cmd, *args
- removed_ENV_variables = {}
rd, wr = IO.pipe
# remove "boring" arguments so that the important ones are more likely to
@@ -570,10 +569,6 @@ class Formula
end
ohai "#{cmd} #{pretty_args*' '}".strip
- if cmd.to_s.start_with? "xcodebuild"
- removed_ENV_variables.update(ENV.remove_cc_etc)
- end
-
@exec_count ||= 0
@exec_count += 1
logd = HOMEBREW_LOGS/name
@@ -582,6 +577,12 @@ class Formula
fork do
ENV['HOMEBREW_CC_LOG_PATH'] = logfn
+
+ # TODO system "xcodebuild" is deprecated, this should be removed soon.
+ if cmd.to_s.start_with? "xcodebuild"
+ ENV.remove_cc_etc
+ end
+
rd.close
$stdout.reopen wr
$stderr.reopen wr
@@ -613,7 +614,6 @@ class Formula
end
ensure
rd.close unless rd.closed?
- ENV.update(removed_ENV_variables)
end
private