aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2014-04-15 11:25:00 -0500
committerJack Nagel2014-04-15 11:26:04 -0500
commit61bff378d398f22c39423350fa2e83eebee86b4b (patch)
tree0bd268a1dc6d6871ca70b8ad1dffddac6d2df215 /Library
parent43bade7b1e57050044ab28fc6bb8b3e09c5706b9 (diff)
downloadhomebrew-61bff378d398f22c39423350fa2e83eebee86b4b.tar.bz2
Don't call xcrun twice
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/os/mac.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/Library/Homebrew/os/mac.rb b/Library/Homebrew/os/mac.rb
index 3a2a31986..f1e3b2a2e 100644
--- a/Library/Homebrew/os/mac.rb
+++ b/Library/Homebrew/os/mac.rb
@@ -60,10 +60,9 @@ module OS
elsif tools_in_prefix? "/"
# probably a safe enough assumption (the unix way)
Pathname.new "/usr/bin"
- elsif not `/usr/bin/xcrun -find make 2>/dev/null`.empty?
+ elsif not (make_path = `/usr/bin/xcrun -find make 2>/dev/null`).empty?
# Note that the exit status of system "xcrun foo" isn't always accurate
- # Wherever "make" is there are the dev tools.
- Pathname.new(`/usr/bin/xcrun -find make`.chomp).dirname
+ Pathname.new(make_path.chomp).dirname
elsif File.exist? "#{Xcode.prefix}/usr/bin/make"
# cc stopped existing with Xcode 4.3, there are c89 and c99 options though
Pathname.new "#{Xcode.prefix}/usr/bin"