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

Method _uvQuoteCmdArg

github-actions/browserstack/set-browserstack-env.js:20224–20249  ·  view source on GitHub ↗
(arg)

Source from the content-addressed store, hash-verified

20222 if (this._isCmdFile()) {
20223 return process.env["COMSPEC"] || "cmd.exe";
20224 }
20225 }
20226 return this.toolPath;
20227 }
20228 _getSpawnArgs(options) {
20229 if (IS_WINDOWS2) {
20230 if (this._isCmdFile()) {
20231 let argline = `/D /S /C "${this._windowsQuoteCmdArg(this.toolPath)}`;
20232 for (const a of this.args) {
20233 argline += " ";
20234 argline += options.windowsVerbatimArguments ? a : this._windowsQuoteCmdArg(a);
20235 }
20236 argline += '"';
20237 return [argline];
20238 }
20239 }
20240 return this.args;
20241 }
20242 _endsWith(str, end) {
20243 return str.endsWith(end);
20244 }
20245 _isCmdFile() {
20246 const upperToolPath = this.toolPath.toUpperCase();
20247 return this._endsWith(upperToolPath, ".CMD") || this._endsWith(upperToolPath, ".BAT");
20248 }
20249 _windowsQuoteCmdArg(arg) {
20250 if (!this._isCmdFile()) {
20251 return this._uvQuoteCmdArg(arg);
20252 }

Callers 1

_windowsQuoteCmdArgMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected