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

Function getExecOutput

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

Source from the content-addressed store, hash-verified

20532 while (n > -1) {
20533 const line = s.substring(0, n);
20534 onLine(line);
20535 s = s.substring(n + os3.EOL.length);
20536 n = s.indexOf(os3.EOL);
20537 }
20538 return s;
20539 } catch (err) {
20540 this._debug(`error processing line. Failed with error ${err}`);
20541 return "";
20542 }
20543 }
20544 _getSpawnFileName() {
20545 if (IS_WINDOWS2) {
20546 if (this._isCmdFile()) {
20547 return process.env["COMSPEC"] || "cmd.exe";
20548 }
20549 }
20550 return this.toolPath;
20551 }
20552 _getSpawnArgs(options) {
20553 if (IS_WINDOWS2) {
20554 if (this._isCmdFile()) {
20555 let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;
20556 for (const a of this.args) {
20557 argline += " ";
20558 argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a);
20559 }
20560 argline += '"';
20561 return [argline];
20562 }
20563 }
20564 return this.args;
20565 }
20566 _endsWith(str, end) {
20567 return str.endsWith(end);
20568 }

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