Fresh history cut from cynarAI/evoo antigravity-handoff/project-timeline (Voice First + project timeline). Brand docs/titles as evOo; keep @rakazo/* packages as tech debt. Excludes node_modules, caches, secrets, voice blobs.
13 lines
452 B
TypeScript
13 lines
452 B
TypeScript
import { spawn } from "node:child_process";
|
|
|
|
export function runProcess(command: string, args: string[], env: NodeJS.ProcessEnv) {
|
|
return new Promise<void>((resolve, reject) => {
|
|
const child = spawn(command, args, { stdio: "inherit", env, shell: false });
|
|
child.on("error", reject);
|
|
child.on("exit", (code) => {
|
|
if (code === 0) resolve();
|
|
else reject(new Error(`${command} ${args.join(" ")} exited ${code}`));
|
|
});
|
|
});
|
|
}
|