mirror of
https://github.com/coreybutler/nvm-windows.git
synced 2025-09-04 19:58:43 +00:00
Merge pull request #963 from Tester798/fix-symlink-detect
Fix symlink detect if it points to nothing
This commit is contained in:
@@ -644,7 +644,7 @@ func use(version string, cpuarch string, reload ...bool) {
|
||||
}
|
||||
|
||||
// Remove symlink if it already exists
|
||||
sym, _ := os.Stat(env.symlink)
|
||||
sym, _ := os.Lstat(env.symlink)
|
||||
if sym != nil {
|
||||
// _, err := runElevated(fmt.Sprintf(`"%s" cmd /C rmdir "%s"`, filepath.Join(env.root, "elevate.cmd"), filepath.Clean(env.symlink)))
|
||||
_, err := elevatedRun("rmdir", filepath.Clean(env.symlink))
|
||||
|
Reference in New Issue
Block a user