import { exec, type ExecException } from "child_process"; export async function pullLatest(path: string) { await promiseExec(`cd "${path}" && git pull`); } export function promiseExec( cmd: string, ): Promise<{ error: ExecException | null; stdout: string; stderr: string }> { return new Promise((resolve, _) => { exec(cmd, (error, stdout, stderr) => { resolve({ error, stdout, stderr }); }); }); }