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 /tests/registry | |
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 'tests/registry')
-rw-r--r-- | tests/registry/npm/@denotest/child-process-fork/1.0.0/index.js | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/tests/registry/npm/@denotest/child-process-fork/1.0.0/index.js b/tests/registry/npm/@denotest/child-process-fork/1.0.0/index.js index 0482be404..ca0ba246a 100644 --- a/tests/registry/npm/@denotest/child-process-fork/1.0.0/index.js +++ b/tests/registry/npm/@denotest/child-process-fork/1.0.0/index.js @@ -1,14 +1,9 @@ const path = require("path"); +const childProcess = require("node:child_process"); function childProcessFork(path) { - const command = new Deno.Command(Deno.execPath(), { - args: ["run", "-A", path], - env: { - "DENO_DONT_USE_INTERNAL_NODE_COMPAT_STATE": Deno[Deno.internal].core.ops.op_npm_process_state(), - } - }); - const child = command.spawn(); - child.status.then(() => { + const child = childProcess.fork(path); + child.on("exit", () => { console.log("Done."); }); } |