(p: string)
| 113 | * may return paths with different casing than what we send them. |
| 114 | */ |
| 115 | export function normalizePath(p: string): string { |
| 116 | if (process.platform !== "win32") return p |
| 117 | const resolved = win32.normalize(win32.resolve(windowsPath(p))) |
| 118 | try { |
| 119 | return realpathSync.native(resolved) |
| 120 | } catch { |
| 121 | return resolved |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | export function normalizePathPattern(p: string): string { |
| 126 | if (process.platform !== "win32") return p |
no test coverage detected