(directory, job, reason)
| 575 | } |
| 576 | |
| 577 | async function runShellCommand(command, cwd, timeoutMs = 120_000) { |
| 578 | return await new Promise((resolve) => { |
| 579 | const child = spawn(command, [], { cwd, shell: true, windowsHide: true }) |
| 580 | const stdout = [] |
| 581 | const stderr = [] |
| 582 | const timer = setTimeout(() => { try { child.kill("SIGTERM") } catch {} }, timeoutMs) |
| 583 | child.stdout?.on("data", (data) => stdout.push(Buffer.from(data))) |
| 584 | child.stderr?.on("data", (data) => stderr.push(Buffer.from(data))) |
no test coverage detected