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

Method _uvQuoteCmdArg

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

Source from the content-addressed store, hash-verified

20222 if (!tool) {
20223 throw new Error("parameter 'tool' is required");
20224 }
20225 const extensions = [];
20226 if (IS_WINDOWS && process.env["PATHEXT"]) {
20227 for (const extension of process.env["PATHEXT"].split(path2.delimiter)) {
20228 if (extension) {
20229 extensions.push(extension);
20230 }
20231 }
20232 }
20233 if (isRooted(tool)) {
20234 const filePath = yield tryGetExecutablePath(tool, extensions);
20235 if (filePath) {
20236 return [filePath];
20237 }
20238 return [];
20239 }
20240 if (tool.includes(path2.sep)) {
20241 return [];
20242 }
20243 const directories = [];
20244 if (process.env.PATH) {
20245 for (const p of process.env.PATH.split(path2.delimiter)) {
20246 if (p) {
20247 directories.push(p);
20248 }
20249 }
20250 }
20251 const matches = [];
20252 for (const directory of directories) {

Callers 1

_windowsQuoteCmdArgMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected