1
0
mirror of https://github.com/upscayl/upscayl.git synced 2024-12-19 10:55:53 +01:00
upscayl/electron/upscayl.ts

17 lines
393 B
TypeScript
Raw Normal View History

2023-03-12 10:49:02 +01:00
import { spawn } from "child_process";
import { execPath } from "./binaries";
2023-03-18 12:58:38 +01:00
export const spawnUpscayl = (binaryName: string, command: string[]) => {
2023-03-12 10:49:02 +01:00
console.log(" Command: ", command);
const spawnedProcess = spawn(execPath(binaryName), command, {
cwd: undefined,
detached: false,
});
return {
process: spawnedProcess,
kill: () => spawnedProcess.kill(),
};
};