| 91 | }; |
| 92 | |
| 93 | const run = (command: string, args: string[], options?: { input?: string; cwd?: string }): void => { |
| 94 | const result = spawnSync(command, args, { |
| 95 | cwd: options?.cwd ?? APP_DIR, |
| 96 | stdio: [options?.input === undefined ? "ignore" : "pipe", "inherit", "inherit"], |
| 97 | input: options?.input, |
| 98 | env: process.env, |
| 99 | }); |
| 100 | if (result.status !== 0) fail(`${command} ${args.join(" ")} exited with ${result.status}`); |
| 101 | }; |
| 102 | |
| 103 | const prNumber = (): number => { |
| 104 | const index = process.argv.indexOf("--pr"); |