Skip to content

Commit

Permalink
feat(cli): print error and don't run with node <4, closes #124
Browse files Browse the repository at this point in the history
  • Loading branch information
Tapppi committed Dec 23, 2016
1 parent 0d8be31 commit d0d71a5
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@
var standardVersion = require('../index')
var cmdParser = require('../command')

standardVersion(cmdParser.argv, function (err) {
if (err) {
process.exit(1)
}
})
/* istanbul ignore if */
if (process.version.match(/v(\d+)\./)[1] < 4) {
console.error('standard-version: Node v4 or greater is required. `standard-version` did not run.')
} else {
standardVersion(cmdParser.argv, function (err) {
if (err) {
process.exit(1)
}
})
}

0 comments on commit d0d71a5

Please sign in to comment.