Skip to content

Commit fdbb7b7

Browse files
committed
Only show exit code on error
1 parent 20bb6ab commit fdbb7b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cli/CLI.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ export class CLI {
136136
});
137137

138138
cmd?.on('exit', async code => {
139-
handlers?.onStdOut?.(`Exited with code ${code}\n`);
140139
const error = stderr || CLI.getErrorsFromStdOut(stdout);
141140
if (error || code !== 0) {
141+
handlers?.onStdOut?.(`Exited with code ${code}\n`);
142142
const finalError = CLI.filterInfoFromOutput(error || stdout);
143143
rej(new Error(finalError));
144144
} else {

0 commit comments

Comments
 (0)