Check even more carefully for xcode_version

Refs Homebrew/homebrew#7236, though honestly I just think @dsarch hasn't updated.
This commit is contained in:
Max Howell 2011-09-05 18:54:07 +01:00
parent 9cdfd2797f
commit 6d075a3b17

View File

@ -299,6 +299,7 @@ module MacOS extend self
@xcode_version ||= begin @xcode_version ||= begin
raise unless system "/usr/bin/which -s xcodebuild" raise unless system "/usr/bin/which -s xcodebuild"
`xcodebuild -version 2>&1` =~ /Xcode (\d(\.\d)*)/ `xcodebuild -version 2>&1` =~ /Xcode (\d(\.\d)*)/
raise if $1.nil?
$1 $1
rescue rescue
# for people who don't have xcodebuild installed due to using # for people who don't have xcodebuild installed due to using