(executable: string)
| 30 | } |
| 31 | |
| 32 | function normalizeExecutable(executable: string): string { |
| 33 | if (process.platform !== 'win32') { |
| 34 | return executable; |
| 35 | } |
| 36 | const lower = executable.toLowerCase(); |
| 37 | if (lower === 'npm' || lower === 'pnpm' || lower === 'yarn' || lower === 'npx') { |
| 38 | return `${lower}.cmd`; |
| 39 | } |
| 40 | return executable; |
| 41 | } |
| 42 | |
| 43 | function parseCommandWithPortSupport(commandStr: string): { executable: string; args: string[]; needsDoubleDash: boolean } { |
| 44 | const parts = commandStr.trim().split(/\s+/); |