1
0
mirror of https://github.com/upscayl/upscayl.git synced 2025-02-23 05:49:36 +01:00
upscayl/electron/upscayl.ts

17 lines
393 B
TypeScript
Raw Normal View History

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