Skip to content

Commit 5c56251

Browse files
committed
fix(childprocess): log rejected command
Problem: Unhandled promise rejection results in mysterious CI log message: rejected promise not handled within 1 second: Error: Command exited with non-zero code: 1 Solution: Include the command name+args in the rejection message.
1 parent a24de71 commit 5c56251

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/core/src/shared/utilities/processUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ export class ChildProcess {
367367
if (typeof rejectOnErrorCode === 'function') {
368368
reject(rejectOnErrorCode(code))
369369
} else {
370-
reject(new Error(`Command exited with non-zero code: ${code}`))
370+
reject(new Error(`Command exited with non-zero code (${code}): ${this.toString()}`))
371371
}
372372
}
373373
if (options.waitForStreams === false) {

0 commit comments

Comments
 (0)