Fix CLT latest version check for 10.8/9
Closes Homebrew/homebrew#23874.
This commit is contained in:
parent
a4d630003d
commit
0aa7457b79
@ -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.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user