(commandLine, args, options)
| 20532 | } |
| 20533 | stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => { |
| 20534 | if (this.options.listeners && this.options.listeners.stdline) { |
| 20535 | this.options.listeners.stdline(line); |
| 20536 | } |
| 20537 | }); |
| 20538 | }); |
| 20539 | } |
| 20540 | let errbuffer = ""; |
| 20541 | if (cp.stderr) { |
| 20542 | cp.stderr.on("data", (data) => { |
| 20543 | state.processStderr = true; |
| 20544 | if (this.options.listeners && this.options.listeners.stderr) { |
| 20545 | this.options.listeners.stderr(data); |
| 20546 | } |
| 20547 | if (!optionsNonNull.silent && optionsNonNull.errStream && optionsNonNull.outStream) { |
| 20548 | const s = optionsNonNull.failOnStdErr ? optionsNonNull.errStream : optionsNonNull.outStream; |
| 20549 | s.write(data); |
| 20550 | } |
| 20551 | errbuffer = this._processLineBuffer(data, errbuffer, (line) => { |
| 20552 | if (this.options.listeners && this.options.listeners.errline) { |
| 20553 | this.options.listeners.errline(line); |
| 20554 | } |
| 20555 | }); |
| 20556 | }); |
| 20557 | } |
| 20558 | cp.on("error", (err) => { |
| 20559 | state.processError = err.message; |
| 20560 | state.processExited = true; |
| 20561 | state.processClosed = true; |
| 20562 | state.CheckComplete(); |
| 20563 | }); |
| 20564 | cp.on("exit", (code) => { |
| 20565 | state.processExitCode = code; |
| 20566 | state.processExited = true; |
| 20567 | this._debug(`Exit code ${code} received from tool '${this.toolPath}'`); |
| 20568 | state.CheckComplete(); |
no test coverage detected