Avoid calling xcodebuild twice

This commit is contained in:
Jack Nagel 2014-04-01 18:51:34 -05:00
parent 66c8f2707c
commit 97ca3baedc

View File

@ -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