diff options
| author | Jack Nagel | 2013-11-01 16:16:01 -0500 |
|---|---|---|
| committer | Jack Nagel | 2013-11-01 18:58:19 -0500 |
| commit | 0aa7457b791dbdc2ced3f24c708d3218d5b745cd (patch) | |
| tree | 33cd5b4c70d7f4fc919c8559bdd8f7690982c1d6 /Library/Homebrew/os | |
| parent | a4d630003db107b6671c5702a020ccf43b5d078f (diff) | |
| download | brew-0aa7457b791dbdc2ced3f24c708d3218d5b745cd.tar.bz2 | |
Fix CLT latest version check for 10.8/9
Closes Homebrew/homebrew#23874.
Diffstat (limited to 'Library/Homebrew/os')
| -rw-r--r-- | Library/Homebrew/os/mac/xcode.rb | 14 |
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. |
