()
| 20449 | if (errbuffer.length > 0) { |
| 20450 | this.emit("errline", errbuffer); |
| 20451 | } |
| 20452 | cp.removeAllListeners(); |
| 20453 | if (error) { |
| 20454 | reject(error); |
| 20455 | } else { |
| 20456 | resolve2(exitCode); |
| 20457 | } |
| 20458 | }); |
| 20459 | if (this.options.input) { |
| 20460 | if (!cp.stdin) { |
| 20461 | throw new Error("child process missing stdin"); |
| 20462 | } |
| 20463 | cp.stdin.end(this.options.input); |