MCPcopy Index your code
hub / github.com/callstack/agent-device / resolvePathExtensions

Function resolvePathExtensions

src/utils/exec.ts:656–665  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

654}
655
656function resolvePathExtensions(): string[] {
657 if (process.platform !== 'win32') return [''];
658 const rawPathExt = process.env.PATHEXT;
659 if (!rawPathExt) return WINDOWS_PATH_EXTENSIONS;
660 const extensions = rawPathExt
661 .split(';')
662 .map((value) => value.trim().toLowerCase())
663 .filter((value) => value.length > 0);
664 return extensions.length > 0 ? extensions : WINDOWS_PATH_EXTENSIONS;
665}
666
667function resolveExecutableCandidates(cmd: string, pathExtensions: string[]): string[] {
668 if (process.platform !== 'win32') return [cmd];

Callers 1

whichCmdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected