Skip to content

Commit 9f09a45

Browse files
authored
fix: "still running..." shows for parallel matrix jobs even though its finished (#1570)
1 parent 10744ec commit 9f09a45

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/job.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,8 +1015,14 @@ export class Job {
10151015
cp.stdout?.pipe(split2()).on("data", (e: string) => outFunc(e, writeStreams.stdout.bind(writeStreams), (s) => chalk`{greenBright ${s}}`));
10161016
cp.stderr?.pipe(split2()).on("data", (e: string) => outFunc(e, writeStreams.stderr.bind(writeStreams), (s) => chalk`{redBright ${s}}`));
10171017
}
1018-
void cp.on("exit", (code) => resolve(code ?? 0));
1019-
void cp.on("error", (err) => reject(err));
1018+
void cp.on("exit", (code) => {
1019+
clearTimeout(this._longRunningSilentTimeout);
1020+
return resolve(code ?? 0);},
1021+
);
1022+
void cp.on("error", (err) => {
1023+
clearTimeout(this._longRunningSilentTimeout);
1024+
return reject(err);
1025+
});
10201026

10211027
if (imageName) {
10221028
cp.stdin?.end(". /gcl-cmd");

0 commit comments

Comments
 (0)