Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gyp: fix XCode CLT version detection on Catalina #2141

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions gyp/pylib/gyp/xcode_emulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1541,6 +1541,13 @@ def CLTVersion():
except GypError:
continue

regex = re.compile('Command Line Tools for Xcode\s+(?P<version>\S+)')
try:
output = GetStdout(['/usr/sbin/softwareupdate', '--history'])
return re.search(regex, output).groupdict()['version']
except (GypError, OSError):
return None


def GetStdoutQuiet(cmdlist):
"""Returns the content of standard output returned by invoking |cmdlist|.
Expand Down