(args: string[], opts: SpawnGbrainOptions = {})
| 207 | * for callers that want to surface gbrain's stderr as the error message. |
| 208 | */ |
| 209 | export function execGbrainText(args: string[], opts: SpawnGbrainOptions = {}): string { |
| 210 | return execFileSync("gbrain", args, { |
| 211 | encoding: "utf-8", |
| 212 | timeout: opts.timeout ?? 30_000, |
| 213 | cwd: opts.cwd, |
| 214 | stdio: opts.stdio || ["ignore", "pipe", "pipe"], |
| 215 | env: buildGbrainEnv({ baseEnv: opts.baseEnv, announce: opts.announce }), |
| 216 | shell: NEEDS_SHELL_ON_WINDOWS, // #1731: gbrain is a .cmd shim on Windows |
| 217 | }); |
| 218 | } |
no test coverage detected