Function
runGit
(dir: string, args: readonly string[])
Source from the content-addressed store, hash-verified
| 299 | // launch), so a non-zero exit is turned into a throw to preserve the old |
| 300 | // reject-on-failure contract. |
| 301 | async function runGit(dir: string, args: readonly string[]): Promise<void> { |
| 302 | const r = await gitExec([...args], dir); |
| 303 | if (r.exitCode !== 0) { |
| 304 | throw new Error(`git ${args[0] ?? ''} exited ${r.exitCode}: ${String(r.stderr).slice(0, 500)}`); |
| 305 | } |
| 306 | } |
| 307 | |
| 308 | interface RunResult { |
| 309 | readonly ok: boolean; |
Tested by
no test coverage detected