We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9158221 commit e20fe58Copy full SHA for e20fe58
1 file changed
pylib/gyp/xcode_emulation.py
@@ -1538,17 +1538,15 @@ def CLTVersion():
1538
for key in [MAVERICKS_PKG_ID, STANDALONE_PKG_ID, FROM_XCODE_PKG_ID]:
1539
try:
1540
output = GetStdout(["/usr/sbin/pkgutil", "--pkg-info", key])
1541
- m = re.search(regex, output)
1542
- if m:
+ if m := re.search(regex, output):
1543
return m.groupdict()["version"]
1544
except (GypError, OSError):
1545
continue
1546
1547
regex = re.compile(r"Command Line Tools for Xcode\s+(?P<version>\S+)")
1548
1549
output = GetStdout(["/usr/sbin/softwareupdate", "--history"])
1550
1551
1552
1553
1554
return None
0 commit comments