CLT.installed?: base result on version detection
CLT.installed? previously returned false if the user had outdated dev tools installed after a 10.9 upgrade, which was confusing to users.
This commit is contained in:
parent
b5e2996365
commit
3943a77832
@ -172,18 +172,10 @@ module OS
|
|||||||
MAVERICKS_PKG_ID = "com.apple.pkg.CLTools_Executables"
|
MAVERICKS_PKG_ID = "com.apple.pkg.CLTools_Executables"
|
||||||
MAVERICKS_PKG_PATH = Pathname.new("/Library/Developer/CommandLineTools")
|
MAVERICKS_PKG_PATH = Pathname.new("/Library/Developer/CommandLineTools")
|
||||||
|
|
||||||
# True if:
|
# Returns true even if outdated tools are installed, e.g.
|
||||||
# - Xcode < 4.3 is installed. The tools are found under /usr.
|
# tools from Xcode 4.x on 10.9
|
||||||
# - The "Command Line Tools" package has been installed.
|
|
||||||
# For OS X < 10.9, the tools are found under /usr. 10.9 always
|
|
||||||
# includes tools there, which run the real tools inside Xcode on
|
|
||||||
# Xcode-only installs, so it's necessary to look elsewhere.
|
|
||||||
def installed?
|
def installed?
|
||||||
if MacOS.version < :mavericks
|
!!detect_version
|
||||||
usr_dev_tools?
|
|
||||||
else
|
|
||||||
mavericks_dev_tools?
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def mavericks_dev_tools?
|
def mavericks_dev_tools?
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user