Skip to content

Commit

Permalink
Script / build: Make errors result in non-zero exit code
Browse files Browse the repository at this point in the history
  • Loading branch information
alexblunck committed Nov 22, 2017
1 parent 3f8050c commit acbddd9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,13 @@ function build() {
compiler.run((err, stats) => {
if (err) {
console.log(chalk.red.bold(err.message) + '\n')
process.exit(1)

// Make sure error results in non-zero exit code
process.on('beforeExit', () => {
process.exit(1)
})

return
}

if (stats.hasErrors()) {
Expand Down

0 comments on commit acbddd9

Please sign in to comment.