Skip to content

Commit eb2d80c

Browse files
committed
fix(deps): read nodeChildProcess synchronously
nodeChildProcess is the ChildProcess itself, not a promise, so awaiting it was a no-op and the void operators were redundant.
1 parent 58f3191 commit eb2d80c

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/job.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -934,10 +934,10 @@ If you know what you're doing and would like to suppress this warning, use one o
934934
env: {...expanded, ...process.env},
935935
reject: false,
936936
});
937-
const interactiveChildProcess = await interactiveCp.nodeChildProcess;
937+
const interactiveChildProcess = interactiveCp.nodeChildProcess;
938938
return new Promise<number>((resolve, reject) => {
939-
void interactiveChildProcess.on("exit", (code) => resolve(code ?? 0));
940-
void interactiveChildProcess.on("error", (err) => reject(err));
939+
interactiveChildProcess.on("exit", (code) => resolve(code ?? 0));
940+
interactiveChildProcess.on("error", (err) => reject(err));
941941
});
942942
}
943943

@@ -1147,7 +1147,7 @@ If you know what you're doing and would like to suppress this warning, use one o
11471147
env: imageName ? process.env : expanded,
11481148
reject: false,
11491149
});
1150-
const childProcess = await cp.nodeChildProcess;
1150+
const childProcess = cp.nodeChildProcess;
11511151

11521152
// eslint-disable-next-line no-control-regex
11531153
const sectionRegex = /\x1b\[0Ksection_(start|end):(\d+):([^\s[]+)(?:\[[^\]]*\])?\r\x1b\[0K/;
@@ -1191,11 +1191,11 @@ If you know what you're doing and would like to suppress this warning, use one o
11911191
}
11921192
// Wait for "close" rather than "exit" so all stdout/stderr data events
11931193
// have flushed to the output log file before we resolve.
1194-
void childProcess.on("close", (code) => {
1194+
childProcess.on("close", (code) => {
11951195
clearTimeout(this._longRunningSilentTimeout);
11961196
return resolve(code ?? 0);},
11971197
);
1198-
void childProcess.on("error", (err) => {
1198+
childProcess.on("error", (err) => {
11991199
clearTimeout(this._longRunningSilentTimeout);
12001200
return reject(err);
12011201
});

0 commit comments

Comments
 (0)