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/internal/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/internal/child_process.ts')
-rw-r--r-- | ext/node/polyfills/internal/child_process.ts | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/node/polyfills/internal/child_process.ts b/ext/node/polyfills/internal/child_process.ts index 56fc21f35..6f209b719 100644 --- a/ext/node/polyfills/internal/child_process.ts +++ b/ext/node/polyfills/internal/child_process.ts @@ -56,7 +56,12 @@ import { StringPrototypeSlice } from "ext:deno_node/internal/primordials.mjs"; import { StreamBase } from "ext:deno_node/internal_binding/stream_wrap.ts"; import { Pipe, socketType } from "ext:deno_node/internal_binding/pipe_wrap.ts"; import { Socket } from "node:net"; -import { kDetached, kExtraStdio, kIpc } from "ext:runtime/40_process.js"; +import { + kDetached, + kExtraStdio, + kIpc, + kNeedsNpmProcessState, +} from "ext:runtime/40_process.js"; export function mapValues<T, O>( record: Readonly<Record<string, T>>, @@ -281,6 +286,8 @@ export class ChildProcess extends EventEmitter { [kIpc]: ipc, // internal [kExtraStdio]: extraStdioNormalized, [kDetached]: detached, + // deno-lint-ignore no-explicit-any + [kNeedsNpmProcessState]: (options ?? {} as any)[kNeedsNpmProcessState], }).spawn(); this.pid = this.#process.pid; |