diff options
author | Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com> | 2024-09-27 12:35:37 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-27 12:35:37 -0700 |
commit | fbddd5a2ebfb11dd376a751e9fc4cf09a6286ada (patch) | |
tree | 75c13ee9f26f61fe8c1d6f80df2580a523177c1b /ext/node/polyfills/child_process.ts | |
parent | a8d1ab52761516b7f9b6069d6e433254794ed48c (diff) |
fix(node): Pass NPM_PROCESS_STATE to subprocesses via temp file instead of env var (#25896)
Fixes https://github.com/denoland/deno/issues/25401. Fixes
https://github.com/denoland/deno/issues/25841. Fixes
https://github.com/denoland/deno/issues/25891.
Diffstat (limited to 'ext/node/polyfills/child_process.ts')
-rw-r--r-- | ext/node/polyfills/child_process.ts | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/node/polyfills/child_process.ts b/ext/node/polyfills/child_process.ts index f77a430c2..c37dfc410 100644 --- a/ext/node/polyfills/child_process.ts +++ b/ext/node/polyfills/child_process.ts @@ -10,7 +10,6 @@ import { internals } from "ext:core/mod.js"; import { op_bootstrap_unstable_args, op_node_child_ipc_pipe, - op_npm_process_state, } from "ext:core/ops"; import { @@ -54,6 +53,7 @@ import { convertToValidSignal, kEmptyObject, } from "ext:deno_node/internal/util.mjs"; +import { kNeedsNpmProcessState } from "ext:runtime/40_process.js"; const MAX_BUFFER = 1024 * 1024; @@ -168,9 +168,8 @@ export function fork( options.execPath = options.execPath || Deno.execPath(); options.shell = false; - Object.assign(options.env ??= {}, { - DENO_DONT_USE_INTERNAL_NODE_COMPAT_STATE: op_npm_process_state(), - }); + // deno-lint-ignore no-explicit-any + (options as any)[kNeedsNpmProcessState] = true; return spawn(options.execPath, args, options); } |