mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-10-09 15:58:34 +00:00
13 lines
309 B
JavaScript
13 lines
309 B
JavaScript
const { spawn } = require("node:child_process");
|
|
const electronPath = require("electron"); // returns binary path
|
|
|
|
const env = { ...process.env };
|
|
delete env.ELECTRON_RUN_AS_NODE;
|
|
|
|
const child = spawn(electronPath, ["."], {
|
|
stdio: "inherit",
|
|
env,
|
|
});
|
|
|
|
child.on("exit", (code) => process.exit(code ?? 0));
|