MCPcopy
hub / github.com/openclaw/clawsweeper / ghTextAsync

Function ghTextAsync

src/repair/github-cli.ts:188–197  ·  view source on GitHub ↗
(ghArgs: string[], options: GhRunOptions = {})

Source from the content-addressed store, hash-verified

186}
187
188export 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
199export function ghBestEffort(ghArgs: string[], options: GhRunOptions = {}): void {
200 try {

Callers 1

ghTextWithRetryAsyncFunction · 0.85

Calls 4

ghTextFunction · 0.85
ghEnvFunction · 0.85
repoRootFunction · 0.70
stripAnsiFunction · 0.70

Tested by

no test coverage detected