From 293092c362febffe19f72712467565045e08e8f1 Mon Sep 17 00:00:00 2001 From: Jonas Hermsmeier Date: Tue, 5 Jun 2018 14:41:17 +0200 Subject: [PATCH] gyp: fix regex to match multi-digit versions 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: https://github.com/nodejs/node-gyp/issues/1454 PR-URL: https://github.com/nodejs/node-gyp/pull/1455 Reviewed-By: Ben Noordhuis --- gyp/pylib/gyp/xcode_emulation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gyp/pylib/gyp/xcode_emulation.py b/gyp/pylib/gyp/xcode_emulation.py index 2aca1c762d..4321f60895 100644 --- a/gyp/pylib/gyp/xcode_emulation.py +++ b/gyp/pylib/gyp/xcode_emulation.py @@ -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.