(p: string)
| 227 | } |
| 228 | |
| 229 | export function resolve(p: string): string { |
| 230 | const resolved = pathResolve(windowsPath(p)) |
| 231 | try { |
| 232 | return normalizePath(realpathSync(resolved)) |
| 233 | } catch (e: any) { |
| 234 | if (e?.code === "ENOENT") return normalizePath(resolved) |
| 235 | throw e |
| 236 | } |
| 237 | } |
| 238 | |
| 239 | export function windowsPath(p: string): string { |
| 240 | if (process.platform !== "win32") return p |
nothing calls this directly
no test coverage detected