add error message for unsupported versions of node

This commit is contained in:
Iuri Matias 2018-01-12 15:36:10 -05:00
parent d9ac76a0b7
commit 66f1261621
1 changed files with 10 additions and 0 deletions

View File

@ -1,4 +1,14 @@
#!/usr/bin/env node #!/usr/bin/env node
try {
eval('let __nodeTest = 123;');
} catch(e) {
if (e.name === 'SyntaxError') {
console.error("unsupported version of NodeJS. Make sure you are running nodejs 6.9.5 or above");
process.exit();
}
}
var Cmd = require('../lib/cmd'); var Cmd = require('../lib/cmd');
var cli = new Cmd(); var cli = new Cmd();
cli.process(process.argv); cli.process(process.argv);