(ghArgs: string[], options: GhRunOptions = {})
| 186 | } |
| 187 | |
| 188 | export async function ghTextAsync(ghArgs: string[], options: GhRunOptions = {}): Promise<string> { |
| 189 | if (options.input !== undefined) return ghText(ghArgs, options); |
| 190 | const { stdout } = await execFileAsync("gh", ghArgs, { |
| 191 | cwd: options.cwd ?? repoRoot(), |
| 192 | env: ghEnv(options.env), |
| 193 | encoding: "utf8", |
| 194 | maxBuffer: 64 * 1024 * 1024, |
| 195 | }); |
| 196 | return stripAnsi(String(stdout)).trim(); |
| 197 | } |
| 198 | |
| 199 | export function ghBestEffort(ghArgs: string[], options: GhRunOptions = {}): void { |
| 200 | try { |
no test coverage detected