Skip to content
Snippets Groups Projects
Commit da56a450 authored by Jack Nagel's avatar Jack Nagel
Browse files

Prefer current CLT package ID

It seems that "com.apple.pkg.CLTools_Base" was only used for one
release. New releases are using "com.apple.pkg.CLTools_Executables"
again.

Fixes Homebrew/homebrew#33063.
parent 7b550b94
No related branches found
No related tags found
No related merge requests found
......@@ -149,8 +149,7 @@ module OS
STANDALONE_PKG_ID = "com.apple.pkg.DeveloperToolsCLILeo"
FROM_XCODE_PKG_ID = "com.apple.pkg.DeveloperToolsCLI"
MAVERICKS_PKG_ID = "com.apple.pkg.CLTools_Executables"
# Used for Yosemite and Mavericks CLT since June 2014.
MAVERICKS_NEW_PKG_ID = "com.apple.pkg.CLTools_Base"
MAVERICKS_NEW_PKG_ID = "com.apple.pkg.CLTools_Base" # obsolete
MAVERICKS_PKG_PATH = "/Library/Developer/CommandLineTools"
# Returns true even if outdated tools are installed, e.g.
......@@ -187,7 +186,7 @@ module OS
end
def detect_version
[MAVERICKS_NEW_PKG_ID, MAVERICKS_PKG_ID, STANDALONE_PKG_ID, FROM_XCODE_PKG_ID].find do |id|
[MAVERICKS_PKG_ID, MAVERICKS_NEW_PKG_ID, STANDALONE_PKG_ID, FROM_XCODE_PKG_ID].find do |id|
version = MacOS.pkgutil_info(id)[/version: (.+)$/, 1]
return version if version
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment