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

Method _getCommandString

github-actions/saucelabs/set-saucelabs-env.js:20093–20121  ·  view source on GitHub ↗
(options, noPrefix)

Source from the content-addressed store, hash-verified

20091 }
20092 }
20093 _getCommandString(options, noPrefix) {
20094 const toolPath = this._getSpawnFileName();
20095 const args = this._getSpawnArgs(options);
20096 let cmd = noPrefix ? "" : "[command]";
20097 if (IS_WINDOWS2) {
20098 if (this._isCmdFile()) {
20099 cmd += toolPath;
20100 for (const a of args) {
20101 cmd += ` ${a}`;
20102 }
20103 } else if (options.windowsVerbatimArguments) {
20104 cmd += `"${toolPath}"`;
20105 for (const a of args) {
20106 cmd += ` ${a}`;
20107 }
20108 } else {
20109 cmd += this._windowsQuoteCmdArg(toolPath);
20110 for (const a of args) {
20111 cmd += ` ${this._windowsQuoteCmdArg(a)}`;
20112 }
20113 }
20114 } else {
20115 cmd += toolPath;
20116 for (const a of args) {
20117 cmd += ` ${a}`;
20118 }
20119 }
20120 return cmd;
20121 }
20122 _processLineBuffer(data, strBuffer, onLine) {
20123 try {
20124 let s = strBuffer + data.toString();

Callers 1

execMethod · 0.45

Calls 4

_getSpawnFileNameMethod · 0.45
_getSpawnArgsMethod · 0.45
_isCmdFileMethod · 0.45
_windowsQuoteCmdArgMethod · 0.45

Tested by

no test coverage detected