fix(restart): correctly prevent double npm publish run
This commit is contained in:
@@ -43,7 +43,14 @@ if (~argv._.indexOf('pre')) {
|
||||
}
|
||||
|
||||
console.log('Publishing v' + result)
|
||||
if (publish) require('../src/restart')()
|
||||
if (publish) require('../src/restart')(function (err) {
|
||||
if (err) {
|
||||
console.log('Something went wrong.')
|
||||
throw err
|
||||
}
|
||||
|
||||
process.exit(1)
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
@@ -59,7 +66,6 @@ if (~argv._.indexOf('post')) {
|
||||
// see src/restart.js
|
||||
if (~npmArgv.indexOf('--semantic-release-rerun')) {
|
||||
console.log('Everything is alright :) npm will now print an error message that you can safely ignore.')
|
||||
process.exit(1)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user