Files
upscayl/electron/upscayl.ts
2023-05-01 13:14:12 +05:30

21 lines
435 B
TypeScript

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