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

Function exec

github-actions/browserstack/set-browserstack-env.js:20522–20533  ·  view source on GitHub ↗
(commandLine, args, options)

Source from the content-addressed store, hash-verified

20520 return reject(new Error(`The cwd: ${this.options.cwd} does not exist!`));
20521 }
20522 const fileName = this._getSpawnFileName();
20523 const cp = child.spawn(fileName, this._getSpawnArgs(optionsNonNull), this._getSpawnOptions(this.options, fileName));
20524 let stdbuffer = "";
20525 if (cp.stdout) {
20526 cp.stdout.on("data", (data) => {
20527 if (this.options.listeners && this.options.listeners.stdout) {
20528 this.options.listeners.stdout(data);
20529 }
20530 if (!optionsNonNull.silent && optionsNonNull.outStream) {
20531 optionsNonNull.outStream.write(data);
20532 }
20533 stdbuffer = this._processLineBuffer(data, stdbuffer, (line) => {
20534 if (this.options.listeners && this.options.listeners.stdline) {
20535 this.options.listeners.stdline(line);
20536 }

Callers 1

getExecOutputFunction · 0.70

Calls 4

__awaiter5Function · 0.70
argStringToArrayFunction · 0.70
sliceMethod · 0.45
execMethod · 0.45

Tested by

no test coverage detected