From 8daa772c619d6f12c214881ce03cda471bacee8f Mon Sep 17 00:00:00 2001 From: NGPixel Date: Tue, 11 Apr 2017 20:17:34 -0400 Subject: [PATCH] Fix git version detection during setup wizard --- configure.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.js b/configure.js index a271fb47..63a1d75c 100644 --- a/configure.js +++ b/configure.js @@ -90,7 +90,7 @@ module.exports = (port, spinner) => { if (err || stdout.length < 3) { reject(new Error('Git is not installed or not reachable from PATH.')) } - let gitver = _.chain(stdout.replace(/[^\d.]/g, '')).split('.').take(3).join('.').value() + let gitver = _.head(stdout.match(/[\d]+\.[\d]+\.[\d]+/g)) if (!semver.satisfies(semver.clean(gitver), '>=2.7.4')) { reject(new Error('Git version is too old. Minimum is v2.7.4.')) }