(ghArgs: string[], options: GhRunOptions = {})
| 139 | } |
| 140 | |
| 141 | export function ghText(ghArgs: string[], options: GhRunOptions = {}): string { |
| 142 | const text = execFileSync("gh", ghArgs, { |
| 143 | cwd: options.cwd ?? repoRoot(), |
| 144 | env: ghEnv(options.env), |
| 145 | encoding: "utf8", |
| 146 | input: options.input, |
| 147 | maxBuffer: 64 * 1024 * 1024, |
| 148 | stdio: ["ignore", "pipe", "pipe"], |
| 149 | }); |
| 150 | return stripAnsi(text).trim(); |
| 151 | } |
| 152 | |
| 153 | export function ghTextWithRetry(ghArgs: string[], options: GhRetryOptions | number = {}): string { |
| 154 | const resolved = resolveRetryOptions(options); |
no test coverage detected