(p: string)
| 125 | */ |
| 126 | export function unsafeIndexRootReason(projectRoot: string): string | null { |
| 127 | const resolve = (p: string): string => { |
| 128 | try { |
| 129 | return fs.realpathSync(path.resolve(p)); |
| 130 | } catch { |
| 131 | return path.resolve(p); |
| 132 | } |
| 133 | }; |
| 134 | const resolved = resolve(projectRoot); |
| 135 | |
| 136 | // Filesystem root: `/` on POSIX, a drive root like `C:\` on Windows. |