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 /runtime/js | |
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 'runtime/js')
-rw-r--r-- | runtime/js/40_process.js | 4 | ||||
-rw-r--r-- | runtime/js/99_main.js | 1 |
2 files changed, 4 insertions, 1 deletions
diff --git a/runtime/js/40_process.js b/runtime/js/40_process.js index 2592c5c46..e2cb1d95b 100644 --- a/runtime/js/40_process.js +++ b/runtime/js/40_process.js @@ -160,6 +160,7 @@ function run({ export const kExtraStdio = Symbol("extraStdio"); export const kIpc = Symbol("ipc"); export const kDetached = Symbol("detached"); +export const kNeedsNpmProcessState = Symbol("needsNpmProcessState"); const illegalConstructorKey = Symbol("illegalConstructorKey"); @@ -178,6 +179,7 @@ function spawnChildInner(command, apiName, { [kDetached]: detached = false, [kExtraStdio]: extraStdio = [], [kIpc]: ipc = -1, + [kNeedsNpmProcessState]: needsNpmProcessState = false, } = { __proto__: null }) { const child = op_spawn_child({ cmd: pathFromURL(command), @@ -194,6 +196,7 @@ function spawnChildInner(command, apiName, { ipc, extraStdio, detached, + needsNpmProcessState, }, apiName); return new ChildProcess(illegalConstructorKey, { ...child, @@ -421,6 +424,7 @@ function spawnSync(command, { windowsRawArguments, extraStdio: [], detached: false, + needsNpmProcessState: false, }); return { success: result.status.success, diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js index 9134ac48a..0da2072b8 100644 --- a/runtime/js/99_main.js +++ b/runtime/js/99_main.js @@ -487,7 +487,6 @@ const NOT_IMPORTED_OPS = [ // to not depend on them. "op_set_exit_code", "op_napi_open", - "op_npm_process_state", ]; function removeImportedOps() { |