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

Function resolveExecutableCandidates

src/utils/exec.ts:667–674  ·  view source on GitHub ↗
(cmd: string, pathExtensions: string[])

Source from the content-addressed store, hash-verified

665}
666
667function resolveExecutableCandidates(cmd: string, pathExtensions: string[]): string[] {
668 if (process.platform !== 'win32') return [cmd];
669 const lowered = cmd.toLowerCase();
670 if (pathExtensions.some((extension) => lowered.endsWith(extension))) {
671 return [cmd];
672 }
673 return pathExtensions.map((extension) => `${cmd}${extension}`);
674}
675
676export async function isExecutablePath(filePath: string): Promise<boolean> {
677 try {

Callers 1

whichCmdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected