xcode: update regex

Ensures we capture Clang's fourth-digit when it exists. This seems to be on pre-release
versions of OS X only, but is the cause of the misdetection of CLT up-to-date status
on 10.11 several weeks ago.

For full explanation, see Homebrew/homebrew#42261.

Closes Homebrew/homebrew#42261.
This commit is contained in:
Dominyk Tiller 2015-07-30 18:07:07 +01:00
parent a9b9c5ade7
commit 639329cf80

View File

@ -178,7 +178,7 @@ module OS
else
version = `/usr/bin/clang --version`
end
version = version[%r{clang-(\d+\.\d+\.\d+)}, 1] || "0"
version = version[%r{clang-(\d+\.\d+\.\d+(\.\d+)?)}, 1] || "0"
version < latest_version
end