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

Function normalizeExecutableLookup

src/utils/exec.ts:646–654  ·  view source on GitHub ↗
(cmd: string)

Source from the content-addressed store, hash-verified

644}
645
646function normalizeExecutableLookup(cmd: string): string | null {
647 const candidate = cmd.trim();
648 if (!candidate || candidate.includes('\0')) return null;
649 if (path.isAbsolute(candidate)) return candidate;
650 if (candidate.includes('/') || candidate.includes('\\')) {
651 return null;
652 }
653 return BARE_COMMAND_RE.test(candidate) ? candidate : null;
654}
655
656function resolvePathExtensions(): string[] {
657 if (process.platform !== 'win32') return [''];

Callers 2

whichCmdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected