aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorJack Nagel2014-02-27 21:47:38 -0600
committerJack Nagel2014-02-27 21:53:21 -0600
commitc72f9a469d21899338ba5b23c4c8d97f4c03dcd8 (patch)
tree87f209bb353c873b63098ffa64245612228b6f2a /Library/Homebrew
parent4928b4e02c4c5baa0936904482c43de76c2d3b1b (diff)
downloadbrew-c72f9a469d21899338ba5b23c4c8d97f4c03dcd8.tar.bz2
Add an xcodebuild helper and deprecate system "xcodebuild"
In the future we can remove the ENV munging branch from Formula#system. Closes Homebrew/homebrew#27081.
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/extend/fileutils.rb7
-rw-r--r--Library/Homebrew/formula.rb1
2 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/extend/fileutils.rb b/Library/Homebrew/extend/fileutils.rb
index 6a45ad51f..c2c36dc40 100644
--- a/Library/Homebrew/extend/fileutils.rb
+++ b/Library/Homebrew/extend/fileutils.rb
@@ -90,4 +90,11 @@ module FileUtils extend self
def ruby *args
system RUBY_PATH, *args
end
+
+ def xcodebuild *args
+ removed = ENV.remove_cc_etc
+ system "xcodebuild", *args
+ ensure
+ ENV.update(removed)
+ end
end
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 141f12636..a4e5c1722 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -565,6 +565,7 @@ class Formula
ohai "#{cmd} #{pretty_args*' '}".strip
if cmd.to_s.start_with? "xcodebuild"
+ opoo %{system "xcodebuild" is deprecated, use the xcodebuild method instead}
removed_ENV_variables.update(ENV.remove_cc_etc)
end