Skip to content

Commit

Permalink
Don't run on Node.js versions less than 8.6.0 (#1418)
Browse files Browse the repository at this point in the history
Don't run on Node.js versions less than 8.6.0
  • Loading branch information
feross committed Sep 18, 2019
2 parents 4869b15 + 264db54 commit 7886564
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions bin/cmd.js
@@ -1,7 +1,11 @@
#!/usr/bin/env node

if (process.version.match(/v(\d+)\./)[1] < 8) {
console.error('standard: Node 8 or greater is required. `standard` did not run.')
} else {
var match = process.version.match(/v(\d+)\.(\d+)/)
var major = parseInt(match[1], 10)
var minor = parseInt(match[2], 10)

if (major >= 9 || (major === 8 && minor >= 6)) {
require('standard-engine').cli(require('../options'))
} else {
console.error('standard: Node 8 or greater is required. `standard` did not run.')
}

0 comments on commit 7886564

Please sign in to comment.