Do not explode by - token
This commit is contained in:
parent
8daa4bb08a
commit
66380197f4
7
app.js
7
app.js
@ -5,12 +5,11 @@ var fs = require('fs');
|
|||||||
var _ = require('underscore');
|
var _ = require('underscore');
|
||||||
var semver = require('semver');
|
var semver = require('semver');
|
||||||
|
|
||||||
var ver = process.versions.node;
|
var nodejsVersion = process.versions.node;
|
||||||
ver = ver.split('-')[0]; // explode and truncate tag from version
|
|
||||||
|
|
||||||
// jshint undef:false
|
// jshint undef:false
|
||||||
if (!semver.satisfies(ver, '>6.9.0')) {
|
if (!semver.satisfies(nodejsVersion, '>6.9.0')) {
|
||||||
console.log('Node version ' + ver + ' is not supported, please use Node.js 6.9 or higher.');
|
console.log(`Node version ${nodejsVersion} is not supported, please use Node.js 6.9 or higher.`);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user