We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e9eaed7 commit 3649668Copy full SHA for 3649668
lib/exec.js
@@ -15,8 +15,11 @@ module.exports = function exec(script) {
15
});
16
17
console.log('to be executed:' + command_line);
18
- var command = child_exec(command_line);
19
-
+ var command = child_exec(command_line, function (error, stdout, stderr) {
+ if (error) {
20
+ process.exit(error.code || 1);
21
+ }
22
+ });
23
command.stdout.on('data', function(data) {
24
process.stdout.write(data);
25
@@ -25,6 +28,7 @@ module.exports = function exec(script) {
28
26
29
command.on('error', function(err) {
27
30
process.stderr.write(err);
31
+ process.exit(err.code || 1);
32
33
-}
34
+}
0 commit comments