Function
capture
(cmd: string, cmdArgs: string[], opts: { cwd?: string } = {})
Source from the content-addressed store, hash-verified
| 280 | } |
| 281 | } |
| 282 | function capture(cmd: string, cmdArgs: string[], opts: { cwd?: string } = {}): string { |
| 283 | const res = spawnSync(cmd, cmdArgs, { encoding: "utf8", cwd: opts.cwd }); |
| 284 | if (res.status !== 0) { |
| 285 | throw new Error(`[cloudrun] \`${cmd} ${cmdArgs.join(" ")}\` failed: ${res.stderr}`); |
| 286 | } |
| 287 | return res.stdout.trim(); |
| 288 | } |
| 289 | |
| 290 | // ── deploy ────────────────────────────────────────────────────────────────── |
| 291 | |
Tested by
no test coverage detected