Skip to content

Commit 43a89e8

Browse files
author
Michel Hofmann
committed
fix: logging error instead of completely swalling it
1 parent 82de94c commit 43a89e8

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

lib/index.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ var WebpackShellPlugin = function () {
9090
createClass(WebpackShellPlugin, [{
9191
key: 'puts',
9292
value: function puts(error) {
93-
if (error && !this.options.swallowError) {
93+
if (error) {
94+
if (this.options.swallowError) {
95+
console.log(error.message);
96+
return;
97+
}
9498
throw error;
9599
}
96100
}

src/webpack-shell-plugin.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ export default class WebpackShellPlugin {
1818
}
1919

2020
puts(error) {
21-
if (error && !this.options.swallowError) {
21+
if (error) {
22+
if (this.options.swallowError) {
23+
console.log(error.message);
24+
return;
25+
}
2226
throw error;
2327
}
2428
}

0 commit comments

Comments
 (0)