* A directory link any user can make: a junction on Windows (no privilege or * Developer Mode needed), a symlink elsewhere.
(target: string, link: string)
| 452 | * Developer Mode needed), a symlink elsewhere. |
| 453 | */ |
| 454 | function linkDir(target: string, link: string): void { |
| 455 | fs.symlinkSync(target, link, process.platform === 'win32' ? 'junction' : 'dir'); |
| 456 | } |
| 457 | |
| 458 | /** Point `os.homedir()` at `home`: it reads USERPROFILE on Windows, HOME elsewhere. */ |
| 459 | function setHome(home: string | undefined, profile: string | undefined = home): void { |