(name, process)
| 26 | }) |
| 27 | // helpers to collect streams |
| 28 | const collectStreams = (name, process) => { |
| 29 | process.stdout.on('data', (d) => streams[name].out.push(d.toString())) |
| 30 | process.stderr.on('data', (d) => streams[name].err.push(d.toString())) |
| 31 | } |
| 32 | const collectErrorStreams = (name, e) => { |
| 33 | e.stdout && streams[name].out.push(e.stdout) |
| 34 | e.stderr && streams[name].err.push(e.stderr) |