MCPcopy Create free account
hub / github.com/angular/dev-infra / getExecOutput

Function getExecOutput

github-actions/saucelabs/set-saucelabs-env.js:20534–20565  ·  view source on GitHub ↗
(commandLine, args, options)

Source from the content-addressed store, hash-verified

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();

Callers 3

getWindowsInfoFunction · 0.70
getMacOsInfoFunction · 0.70
getLinuxInfoFunction · 0.70

Calls 3

__awaiter5Function · 0.70
execFunction · 0.70
endMethod · 0.45

Tested by

no test coverage detected