Skip to content

Commit f5843b5

Browse files
committed
code: Don't log error when exit safely
1 parent 7347be7 commit f5843b5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/util.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ async function e_call(argv, script, ...args) {
9090
process.stdout.on('data', function (data) { _print_data(data); });
9191
process.stderr.on('data', function (data) { _print_data(data); });
9292

93-
process.on('exit', function (code) { _print_data(code, '\nExit with code '); });
93+
process.on('exit', function (code) {
94+
if (code == 0) return;
95+
_print_data(code, '\nExit with code ');
96+
});
9497
}
9598

9699
/*

0 commit comments

Comments
 (0)