blob: 682d8a084a59503611b04b7e0964be4f623b0e1b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import childProcess from "node:child_process";
import process from "node:process";
import * as path from "node:path";
const script = path.join(
path.dirname(path.fromFileUrl(import.meta.url)),
"node_modules",
"foo",
"index.js",
);
const child = childProcess.spawn(process.execPath, [script], {
stdio: [0, 1, 2],
});
child.on("close", () => console.log("close"));
|