MCPcopy Create free account
hub / github.com/pingdotgg/t3code / resolveWindowsPathExtensions

Function resolveWindowsPathExtensions

packages/shared/src/shell.ts:451–463  ·  view source on GitHub ↗
(env: NodeJS.ProcessEnv)

Source from the content-addressed store, hash-verified

449}
450
451function resolveWindowsPathExtensions(env: NodeJS.ProcessEnv): ReadonlyArray<string> {
452 const rawValue = env.PATHEXT;
453 const fallback = [".COM", ".EXE", ".BAT", ".CMD"];
454 if (!rawValue) return fallback;
455
456 const parsed: string[] = [];
457 for (const entry of rawValue.split(";")) {
458 const trimmed = entry.trim();
459 if (trimmed.length === 0) continue;
460 parsed.push(trimmed.startsWith(".") ? trimmed.toUpperCase() : `.${trimmed.toUpperCase()}`);
461 }
462 return parsed.length > 0 ? Array.from(new Set(parsed)) : fallback;
463}
464
465function resolveCommandCandidates(
466 command: string,

Callers 2

shell.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected