From 97ca3baedc127ac9d7352361178e2706917c729d Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Tue, 1 Apr 2014 18:51:34 -0500 Subject: [PATCH] Avoid calling xcodebuild twice --- Library/Homebrew/os/mac/xcode.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb index c55ef0f279..b64fc6edb5 100644 --- a/Library/Homebrew/os/mac/xcode.rb +++ b/Library/Homebrew/os/mac/xcode.rb @@ -101,7 +101,9 @@ module OS # Xcode 4.3 xc* tools hang indefinately if xcode-select path is set thus raise if bad_xcode_select_path? - raise unless which "xcodebuild" + xcodebuild = which "xcodebuild" + raise unless xcodebuild && xcodebuild != xcode43build + `xcodebuild -version 2>/dev/null` =~ /Xcode (\d(\.\d)*)/ raise if $1.nil? or not $?.success? $1