aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMisty De Meo2014-04-20 16:14:37 -0700
committerMisty De Meo2016-04-18 09:52:46 -0700
commit75f1e49027d2fdf1544467eb9f6e0f9685005b36 (patch)
treecd20147e511bb4ed61a6f0805a121332347f451d /Library
parent19fba42c69de00888461a14ab75d3e3bb2b3fc13 (diff)
downloadbrew-75f1e49027d2fdf1544467eb9f6e0f9685005b36.tar.bz2
CLT: special case detect_version pre-3.x
Fixes mistydemeo/tigerbrew#186. Closes #110. Signed-off-by: Misty De Meo <mistydemeo@github.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/os/mac/xcode.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb
index 9657073dc..bb3873687 100644
--- a/Library/Homebrew/os/mac/xcode.rb
+++ b/Library/Homebrew/os/mac/xcode.rb
@@ -203,6 +203,10 @@ module OS
end
def detect_version
+ # CLT isn't a distinct entity pre-4.3, and pkgutil doesn't exist
+ # at all on Tiger, so just count it as installed if Xcode is installed
+ return MacOS::Xcode.version if MacOS::Xcode.installed? && MacOS::Xcode.version < "3.0"
+
[MAVERICKS_PKG_ID, MAVERICKS_NEW_PKG_ID, STANDALONE_PKG_ID, FROM_XCODE_PKG_ID].find do |id|
if MacOS.version >= :mavericks
next unless File.exist?("#{MAVERICKS_PKG_PATH}/usr/bin/clang")