mirror of
https://github.com/denoland/deno.git
synced 2025-01-21 13:00:36 -05:00
Fixing the error in the try catch block
This commit is contained in:
parent
7477d0cdfb
commit
37fa3ce264
1 changed files with 7 additions and 8 deletions
|
@ -299,17 +299,16 @@ class ChildProcess {
|
|||
try {
|
||||
const onAbort = () => this.kill("SIGTERM");
|
||||
signal?.[abortSignal.add](onAbort);
|
||||
const waitPromise = op_spawn_wait(this.#rid);
|
||||
this.#waitPromise = waitPromise;
|
||||
this.#status = PromisePrototypeThen(waitPromise, (res) => {
|
||||
signal?.[abortSignal.remove](onAbort);
|
||||
this.#waitComplete = true;
|
||||
return res;
|
||||
});
|
||||
} catch (e) {
|
||||
void e;
|
||||
}
|
||||
|
||||
const waitPromise = op_spawn_wait(this.#rid);
|
||||
this.#waitPromise = waitPromise;
|
||||
this.#status = PromisePrototypeThen(waitPromise, (res) => {
|
||||
signal?.[abortSignal.remove](onAbort);
|
||||
this.#waitComplete = true;
|
||||
return res;
|
||||
});
|
||||
}
|
||||
|
||||
#status;
|
||||
|
|
Loading…
Add table
Reference in a new issue