forked from mirrors/probot
Ensure node version is satisfied
This commit is contained in:
parent
f3073ca8b2
commit
9a67cee2c6
|
@ -1,5 +1,13 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
const semver = require('semver');
|
||||
const version = require('../package').engines.node;
|
||||
|
||||
if (!semver.satisfies(process.version, version)) {
|
||||
console.log(`Node.js version ${version} is required. You have ${process.version}.`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
require('commander')
|
||||
.version(require('../package').version)
|
||||
.usage('<command> [options]')
|
||||
|
|
Loading…
Reference in New Issue