Function
resolveExecutableCandidates
(cmd: string, pathExtensions: string[])
Source from the content-addressed store, hash-verified
| 665 | } |
| 666 | |
| 667 | function 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 | |
| 676 | export async function isExecutablePath(filePath: string): Promise<boolean> { |
| 677 | try { |
Tested by
no test coverage detected