Skip to content

Commit 0c8d94f

Browse files
committed
report exit code on Errors
webpack#729
1 parent a2af690 commit 0c8d94f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎bin/webpack.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,4 +167,9 @@ var compiler = webpack(options, function(err, stats) {
167167
lastHash = stats.hash;
168168
process.stdout.write(stats.toString(outputOptions) + "\n");
169169
}
170+
if(!options.watch && stats.hasErrors()) {
171+
process.on("exit", function() {
172+
process.exit(2);
173+
});
174+
}
170175
});

0 commit comments

Comments
 (0)