(msysPath: string)
| 28 | * a context that runs under cmd.exe (e.g., SSH ProxyCommand). |
| 29 | */ |
| 30 | export function toWindowsPath(msysPath: string): string { |
| 31 | // Match MSYS drive-letter convention: /c/Users/... → C:\Users\... |
| 32 | const match = /^\/([a-zA-Z])\/(.*)$/.exec(msysPath); |
| 33 | if (!match) return msysPath; |
| 34 | const drive = match[1].toUpperCase(); |
| 35 | const rest = match[2].replaceAll("/", "\\"); |
| 36 | return `${drive}:\\${rest}`; |
| 37 | } |
no test coverage detected