Skip to content

Commit

Permalink
gyp: fix regex to match multi-digit versions
Browse files Browse the repository at this point in the history
This fixes the regular expression matching in `xcode_emulation`
to also handle version numbers with multiple-digit major versions
which would otherwise break under use of XCode 10

Fixes: #1454
PR-URL: #1455
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
  • Loading branch information
jhermsmeier authored and bnoordhuis committed Jun 8, 2018
1 parent b5b52f7 commit 90cd2e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gyp/pylib/gyp/xcode_emulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1262,7 +1262,7 @@ def XcodeVersion():
except:
version = CLTVersion()
if version:
version = re.match(r'(\d\.\d\.?\d*)', version).groups()[0]
version = re.match(r'(\d+\.\d+\.?\d*)', version).groups()[0]
else:
raise GypError("No Xcode or CLT version detected!")
# The CLT has no build information, so we return an empty string.
Expand Down

0 comments on commit 90cd2e8

Please sign in to comment.