2022-09-28 13:04:16 -04:00
|
|
|
const path = require("path");
|
|
|
|
|
|
|
|
function childProcessFork(path) {
|
2024-01-17 02:18:19 +01:00
|
|
|
const command = new Deno.Command(Deno.execPath(), {
|
2024-01-23 15:33:07 +01:00
|
|
|
args: ["run", "-A", path],
|
2022-09-28 13:04:16 -04:00
|
|
|
env: {
|
2023-01-24 18:54:10 +01:00
|
|
|
"DENO_DONT_USE_INTERNAL_NODE_COMPAT_STATE": Deno[Deno.internal].core.ops.op_npm_process_state(),
|
2022-09-28 13:04:16 -04:00
|
|
|
}
|
|
|
|
});
|
2024-01-17 02:18:19 +01:00
|
|
|
const child = command.spawn();
|
|
|
|
child.status.then(() => {
|
2022-09-28 13:04:16 -04:00
|
|
|
console.log("Done.");
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
run() {
|
|
|
|
childProcessFork(path.join(__dirname, "forked_path.js"));
|
|
|
|
}
|
|
|
|
};
|