CLT.version: check 10.9 CLT first

10.9 users might have older CLT receipts sitting around, which could
result in bad pkgutil results. For example, before changing this, my
`brew --config` was printing '1.0' (the 10.7 version) instead of
'5.0.1.0.1.1382131676', the actual CLT I had installed.
This commit is contained in:
Misty De Meo 2013-12-14 16:20:30 -08:00
parent a1728a8174
commit d1d6451a6a

View File

@ -218,7 +218,7 @@ module OS
end
def detect_version
[STANDALONE_PKG_ID, FROM_XCODE_PKG_ID, MAVERICKS_PKG_ID].find do |id|
[MAVERICKS_PKG_ID, STANDALONE_PKG_ID, FROM_XCODE_PKG_ID].find do |id|
version = MacOS.pkgutil_info(id)[/version: (.+)$/, 1]
return version if version
end