Skip to content

Commit

Permalink
exit with code 1 when build fails (#55)
Browse files Browse the repository at this point in the history
fixes #54
  • Loading branch information
despairblue authored and jaredpalmer committed Mar 29, 2017
1 parent a5064dc commit 9a95006
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/backpack-core/bin/build
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ const serverConfig = userConfig.webpack
process.on('SIGINT', process.exit)

const serverCompiler = webpack(serverConfig)
const compileServer = () => serverCompiler.run(() => undefined)

compileServer()
serverCompiler.run((error, stats) => {
if (error || stats.hasErrors()) {
process.exitCode = 1;
}
})

0 comments on commit 9a95006

Please sign in to comment.