aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-11-01 16:16:01 -0500
committerJack Nagel2013-11-01 18:58:19 -0500
commitd88f2e24c0c8c8a29c4fdc2480e82c2698a8d47d (patch)
tree5d03704b966cdadb67dbaa336dece1fa39d353f1 /Library
parentce669ebb96be7ea61fc385906d93f7170fb42ca3 (diff)
downloadhomebrew-d88f2e24c0c8c8a29c4fdc2480e82c2698a8d47d.tar.bz2
Fix CLT latest version check for 10.8/9
Closes #23874.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/os/mac/xcode.rb14
1 files changed, 10 insertions, 4 deletions
diff --git a/Library/Homebrew/os/mac/xcode.rb b/Library/Homebrew/os/mac/xcode.rb
index 40bc06765..38e77203c 100644
--- a/Library/Homebrew/os/mac/xcode.rb
+++ b/Library/Homebrew/os/mac/xcode.rb
@@ -185,13 +185,19 @@ module OS
MacOS.dev_tools_path == Pathname("/usr/bin") && File.directory?("/usr/include")
end
- def latest_version?
- `/usr/bin/clang --version` =~ %r{clang-(\d+)\.(\d+)\.(\d+)}
- $1.to_i >= 425 and $3.to_i >= 28
+ def latest_version
+ if MacOS.version >= "10.9"
+ "500.2.79"
+ elsif MacOS.version == "10.8"
+ "500.2.78"
+ else
+ "425.0.28"
+ end
end
def outdated?
- !latest_version?
+ version = `/usr/bin/clang --version`[%r{clang-(\d+\.\d+\.\d+)}, 1]
+ version < latest_version
end
# Version string (a pretty damn long one) of the CLT package.