diff --git a/bin/probot b/bin/probot index 7a9d76f5..c871f9a2 100755 --- a/bin/probot +++ b/bin/probot @@ -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(' [options]')