(chunk: string)
| 355 | } |
| 356 | |
| 357 | private handleStdout(chunk: string): void { |
| 358 | this.buffer += chunk; |
| 359 | let newlineIndex = this.buffer.indexOf('\n'); |
| 360 | |
| 361 | while (newlineIndex >= 0) { |
| 362 | const line = this.buffer.slice(0, newlineIndex).trim(); |
| 363 | this.buffer = this.buffer.slice(newlineIndex + 1); |
| 364 | |
| 365 | if (line.length > 0) { |
| 366 | this.handleLine(line); |
| 367 | } |
| 368 | |
| 369 | newlineIndex = this.buffer.indexOf('\n'); |
| 370 | } |
| 371 | } |
| 372 | |
| 373 | private handleLine(line: string): void { |
| 374 | if (this.protocolError) { |