()
| 123 | } |
| 124 | |
| 125 | function pathDirsOnPath(): Set<string> { |
| 126 | const out = new Set<string>() |
| 127 | for (const dir of (process.env.PATH ?? '').split(path.delimiter)) { |
| 128 | const trimmed = dir.trim() |
| 129 | if (!trimmed) continue |
| 130 | try { |
| 131 | out.add(path.resolve(trimmed)) |
| 132 | } catch { |
| 133 | /* skip malformed PATH entries */ |
| 134 | } |
| 135 | } |
| 136 | return out |
| 137 | } |
| 138 | |
| 139 | async function isWritableDir(dir: string): Promise<boolean> { |
| 140 | try { |
no outgoing calls
no test coverage detected