fix(pre): exit script for failed validation

This commit is contained in:
Stephan Bönnemann 2015-05-14 01:50:52 +02:00 committed by Christoph Witzko
parent f0f53f207b
commit 245f918201

View File

@ -51,10 +51,11 @@ module.exports = function (options, plugins, cb) {
var verification = require(opts.name)
verification(opts, efh(cb)(function (ok) {
if (ok) return writePkg()
cb('verification failed')
}))
verification(opts, function (error, ok) {
if (!error && ok) return writePkg()
console.log(error || 'Verification failed')
process.exit(1)
})
}))
}))
}