aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/macos.rb
diff options
context:
space:
mode:
authorJack Nagel2012-07-09 14:30:54 -0500
committerJack Nagel2012-07-25 11:58:01 -0500
commit02f48dd7d89abc27a749d7f2136f2c5c5f1ae88c (patch)
tree4c11667c0467ac52f57c85a39ab3726ca5310529 /Library/Homebrew/macos.rb
parent0b1d759c2c8e860f0903f8835832ac0d98bd1970 (diff)
downloadbrew-02f48dd7d89abc27a749d7f2136f2c5c5f1ae88c.tar.bz2
MacOS: avoid checking clt_version in clt_installed?
Checking "not clt_version.empty?" is unnecessary if we are also checking that dev_tools_path is /usr/bin. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Homebrew/macos.rb')
-rw-r--r--Library/Homebrew/macos.rb16
1 files changed, 5 insertions, 11 deletions
diff --git a/Library/Homebrew/macos.rb b/Library/Homebrew/macos.rb
index 7a37fd0e8..d2b6548a1 100644
--- a/Library/Homebrew/macos.rb
+++ b/Library/Homebrew/macos.rb
@@ -28,14 +28,11 @@ module MacOS extend self
end
end
+ # This is true ift he standard UNIX tools are present under /usr. For
+ # Xcode < 4.3, this is the standard location. Otherwise, it means that
+ # the user has installed the "Command Line Tools for Xcode" package.
def clt_installed?
- # If the command line tools are installed, most unix standard
- # tools, libs and headers are in /usr.
- # Returns true, also for older Xcode/OSX versions that had everything in /usr
- # Beginning with Xcode 4.3, the dev tools are no longer installed
- # in /usr and SDKs no longer in /Developer by default.
- # But Apple provides an optional "Command Line Tools for Xcode" package.
- not clt_version.empty? or dev_tools_path == Pathname.new("/usr/bin")
+ dev_tools_path == Pathname.new("/usr/bin")
end
def clt_version
@@ -53,10 +50,7 @@ module MacOS extend self
from_xcode =~ /version: (.*)$/
$1
else
- # We return "" instead of nil because we want clt_installed? to be true on older Macs.
- # So clt_version.empty? does not mean there are no unix tools in /usr, it just means
- # that the "Command Line Tools for Xcode" package is not installed
- "" # No CLT or recipe available to pkgutil.
+ nil
end
end
end