(wslPath: string)
| 56 | } |
| 57 | |
| 58 | toIDEPath(wslPath: string): string { |
| 59 | if (!wslPath) return wslPath |
| 60 | |
| 61 | try { |
| 62 | // Use wslpath to convert WSL paths to Windows paths |
| 63 | const result = execFileSync('wslpath', ['-w', wslPath], { |
| 64 | encoding: 'utf8', |
| 65 | stdio: ['pipe', 'pipe', 'ignore'], // wslpath writes "wslpath: <errortext>" to stderr |
| 66 | }).trim() |
| 67 | |
| 68 | return result |
| 69 | } catch { |
| 70 | // If wslpath fails, return the original path |
| 71 | return wslPath |
| 72 | } |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | /** |