Fix git version detection during setup wizard

This commit is contained in:
NGPixel 2017-04-11 20:17:34 -04:00
parent b9afbcb792
commit 8daa772c61

View File

@ -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.'))
}