Skip to content

Commit

Permalink
fix: more debug
Browse files Browse the repository at this point in the history
  • Loading branch information
bahmutov committed Jan 23, 2018
1 parent afefea4 commit a67de3a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions bin/semantic-release.js
Expand Up @@ -13,7 +13,7 @@ const debug = require('debug')('semantic-action')

// if anything goes wrong, exit with an error code
process.on('unhandledRejection', function (reason, p) {
console.log('Unhandled Rejection at: Promise',
console.error('Unhandled Rejection at: Promise',
p, ' reason: ', reason)
process.exit(1)
})
Expand Down Expand Up @@ -50,6 +50,8 @@ var options = _.defaults(
githubUrl: env.GH_URL
}
)
debug('all options', options)

var plugins = require('../src/lib/plugins')(options)

npmconf.load({}, function (err, conf) {
Expand Down Expand Up @@ -102,7 +104,10 @@ npmconf.load({}, function (err, conf) {
if (err) {
debug('error verifying conditions', err.message)
log[options.debug ? 'warn' : 'error']('pre', err.message)
if (!options.debug) process.exit(1)
if (!options.debug) {
debug('debugging mode off, exitting')
process.exit(1)
}
}

debug('setting npm registry', npm.registry)
Expand Down

0 comments on commit a67de3a

Please sign in to comment.