( command: string, args: string[] = [] )
| 14 | } |
| 15 | |
| 16 | async function runFile( |
| 17 | command: string, |
| 18 | args: string[] = [] |
| 19 | ): Promise<{ stdout: string; stderr: string }> { |
| 20 | const { stdout, stderr } = await execFileAsync(command, args, { timeout: COMMAND_TIMEOUT_MS }); |
| 21 | return { stdout: String(stdout || ""), stderr: String(stderr || "") }; |
| 22 | } |
| 23 | |
| 24 | function getErrorText(err: any): string { |
| 25 | return `${err?.stderr || ""}\n${err?.stdout || ""}\n${err?.message || ""}`; |
no outgoing calls
no test coverage detected