(stderrChunk: string | null, stdoutChunk: string | null)
| 254 | } |
| 255 | |
| 256 | #spillToDisk(stderrChunk: string | null, stdoutChunk: string | null): void { |
| 257 | this.#disk = new DiskTaskOutput(this.taskId) |
| 258 | |
| 259 | // Flush existing buffers |
| 260 | if (this.#stdoutBuffer) { |
| 261 | this.#disk.append(this.#stdoutBuffer) |
| 262 | this.#stdoutBuffer = '' |
| 263 | } |
| 264 | if (this.#stderrBuffer) { |
| 265 | this.#disk.append(`[stderr] ${this.#stderrBuffer}`) |
| 266 | this.#stderrBuffer = '' |
| 267 | } |
| 268 | |
| 269 | // Write the chunk that triggered overflow |
| 270 | if (stdoutChunk) { |
| 271 | this.#disk.append(stdoutChunk) |
| 272 | } |
| 273 | if (stderrChunk) { |
| 274 | this.#disk.append(`[stderr] ${stderrChunk}`) |
| 275 | } |
| 276 | } |
| 277 | |
| 278 | /** |
| 279 | * Get stdout. In file mode, reads from the output file. |
no test coverage detected