()
| 39 | let _cachedSymlink; |
| 40 | |
| 41 | function canCreateSymlinks() { |
| 42 | if (_cachedSymlink !== undefined) return _cachedSymlink; |
| 43 | const probe = path.join(os.tmpdir(), `evolver-symlink-probe-${process.pid}-${Date.now()}`); |
| 44 | try { |
| 45 | fs.symlinkSync('target-need-not-exist', probe); |
| 46 | try { fs.unlinkSync(probe); } catch { /* best-effort cleanup */ } |
| 47 | _cachedSymlink = true; |
| 48 | } catch { |
| 49 | _cachedSymlink = false; |
| 50 | } |
| 51 | return _cachedSymlink; |
| 52 | } |
| 53 | |
| 54 | // Companion probe: `canMakeDirReadOnly()` returns true only when |
| 55 | // `fs.chmodSync(dir, 0o555)` actually prevents the process from |
no outgoing calls
no test coverage detected