From 19fba42c69de00888461a14ab75d3e3bb2b3fc13 Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Thu, 17 Apr 2014 08:23:02 -0700 Subject: [PATCH] Xcode: update version detection for 2.x --- Library/Homebrew/os/mac/xcode.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb index 4cb8666a41..9657073dcc 100644 --- a/Library/Homebrew/os/mac/xcode.rb +++ b/Library/Homebrew/os/mac/xcode.rb @@ -85,6 +85,13 @@ module OS if File.file? path Utils.popen_read(path, "-version") =~ /Xcode (\d(\.\d)*)/ return $1 if $1 + + # Xcode 2.x's xcodebuild has a different version string + Utils.popen_read(path, "-version") =~ /DevToolsCore-(\d+\.\d)/ + case $1 + when "515.0" then return "2.0" + when "798.0" then return "2.5" + end end end