(candidate: string)
| 40 | } |
| 41 | |
| 42 | function resolveWindowsCandidate(candidate: string): CodexCommand | null { |
| 43 | if (!existsSync(candidate)) { |
| 44 | return null; |
| 45 | } |
| 46 | |
| 47 | if (windowsPath.extname(candidate).toLowerCase() === '.exe') { |
| 48 | return { command: candidate, args: [] }; |
| 49 | } |
| 50 | |
| 51 | const script = resolveShimScript(candidate); |
| 52 | if (script) { |
| 53 | return { command: 'node', args: [script] }; |
| 54 | } |
| 55 | |
| 56 | return null; |
| 57 | } |
| 58 | |
| 59 | function resolveWindowsCodexCommand(): CodexCommand { |
| 60 | for (const candidate of findWhereResults('codex')) { |
no test coverage detected