(bash: Bash, timeoutMs: number)
| 81 | |
| 82 | // Wrapper that adds timeout to just-bash exec calls |
| 83 | function createTimeoutBash(bash: Bash, timeoutMs: number) { |
| 84 | return { |
| 85 | async exec(command: string) { |
| 86 | return withTimeout(bash.exec(command), timeoutMs, command); |
| 87 | }, |
| 88 | fs: bash.fs, |
| 89 | }; |
| 90 | } |
| 91 | |
| 92 | function truncateOutput(output: string): string { |
| 93 | if (output.length <= MAX_OUTPUT_CHARS) return output; |