(chunk: Buffer)
| 178 | const maxBytes = 1_000_000; |
| 179 | let out = ''; |
| 180 | const push = (chunk: Buffer) => { |
| 181 | out += chunk.toString('utf-8'); |
| 182 | if (out.length > maxBytes) { |
| 183 | out = out.slice(out.length - maxBytes); |
| 184 | } |
| 185 | }; |
| 186 | child.stdout?.on('data', push); |
| 187 | child.stderr?.on('data', push); |
| 188 |
no outgoing calls