summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/npm/registry/@denotest/child-process-fork/1.0.0/index.js
blob: 674268e6f29af2afb5ce30e198d4630eb177ac7e (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.core.ops.op_npm_process_state(),
    }
  });
  p.status().then(() => {
    console.log("Done.");
  });
}

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