Skip to content

Commit

Permalink
gyp: fix XCode CLT version detection on Catalina
Browse files Browse the repository at this point in the history
Copies @szekelyisz nodejs/node-gyp#2141 to this repo.
  • Loading branch information
cclauss authored Jun 2, 2020
1 parent 064689a commit 51a0dd9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions 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:
return None


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

0 comments on commit 51a0dd9

Please sign in to comment.