summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/npm/registry/@denotest/child-process-fork/1.0.0/index.js
blob: 6f7dceb98eeaec333e5de0ff490504a84c6f85d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
const path = require("path");

function childProcessFork(path) {
  const p = Deno.run({
    cmd: [Deno.execPath(), "run", "--unstable", "-A", path],
    env: {
      "DENO_DONT_USE_INTERNAL_NODE_COMPAT_STATE": Deno[Deno.internal].core.ops.op_npm_process_state(),
    }
  });
  p.status().then(() => {
    console.log("Done.");
  });
}

module.exports = {
  run() {
    childProcessFork(path.join(__dirname, "forked_path.js"));
  }
};