From 3943a778329f8ad724d743fa8bf3e592373086f8 Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Wed, 26 Mar 2014 10:35:30 -0700 Subject: [PATCH] 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. --- Library/Homebrew/os/mac/xcode.rb | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb index b2e5611e75..c55ef0f279 100644 --- a/Library/Homebrew/os/mac/xcode.rb +++ b/Library/Homebrew/os/mac/xcode.rb @@ -172,18 +172,10 @@ module OS MAVERICKS_PKG_ID = "com.apple.pkg.CLTools_Executables" MAVERICKS_PKG_PATH = Pathname.new("/Library/Developer/CommandLineTools") - # True if: - # - Xcode < 4.3 is installed. The tools are found under /usr. - # - 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. + # Returns true even if outdated tools are installed, e.g. + # tools from Xcode 4.x on 10.9 def installed? - if MacOS.version < :mavericks - usr_dev_tools? - else - mavericks_dev_tools? - end + !!detect_version end def mavericks_dev_tools?