Skip to content

Commit

Permalink
Merge pull request #250 from feons/TIMOB-23448-cli
Browse files Browse the repository at this point in the history
[TIMOB-23448] Set Node 4.X as minimum supported version
  • Loading branch information
cheekiatng committed Jul 20, 2016
2 parents 28fedf8 + 6cdc029 commit 5d22ac5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/titanium.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ var fs = require('fs'),
// set path.existsSync to make old modules designed for <=0.6 happy
path.existsSync = fs.existsSync || path.existsSync;

// check that we're using Node.js 0.10 or newer
// check that we're using supported Node.js version.
try {
if (semver.lt(process.version, '0.10.0')) {
if (!semver.satisfies(process.version, pkgJson.engines.node)) {
console.error(pkgJson.about.name.cyan.bold + ', CLI version ' + pkgJson.version + '\n' + pkgJson.about.copyright + '\n\n' +
'ERROR: Titanium requires Node.js 0.10 or newer.'.red + '\n\n' +
('ERROR: Titanium requires Node.js '+ semver.validRange(pkgJson.engines.node) +'.').red + '\n\n' +
'Visit ' + 'http://nodejs.org/'.cyan + ' to download a newer version.\n');
process.exit(1);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,6 @@
"lib": "./lib"
},
"engines": {
"node": ">=0.10"
"node": ">=4.0"
}
}

0 comments on commit 5d22ac5

Please sign in to comment.