diff options
Diffstat (limited to 'ext/node/polyfills/internal/child_process.ts')
-rw-r--r-- | ext/node/polyfills/internal/child_process.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/node/polyfills/internal/child_process.ts b/ext/node/polyfills/internal/child_process.ts index 62de6a098..5a9212618 100644 --- a/ext/node/polyfills/internal/child_process.ts +++ b/ext/node/polyfills/internal/child_process.ts @@ -275,7 +275,11 @@ export class ChildProcess extends EventEmitter { }); })(); } catch (err) { - this.#_handleError(err); + let e = err; + if (e instanceof Deno.errors.NotFound) { + e = _createSpawnSyncError("ENOENT", command, args); + } + this.#_handleError(e); } } |