1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-11-24 15:40:21 +01:00
upscayl/electron/utils/spawn-upscayl.ts

20 lines
411 B
TypeScript

import { spawn } from "child_process";
import { execPath } from "./get-resource-paths";
export const spawnUpscayl = (
command: string[],
logit: (...args: any) => void
) => {
logit("📢 Upscayl Command: ", command);
const spawnedProcess = spawn(execPath, command, {
cwd: undefined,
detached: false,
});
return {
process: spawnedProcess,
kill: () => spawnedProcess.kill(),
};
};