Fixed PATH check logic

This commit is contained in:
Corey Butler
2023-01-26 20:51:17 -06:00
parent 534ee15477
commit fdbf31dfdd

View File

@@ -861,7 +861,7 @@ func checkLocalEnvironment() {
break
}
if _, err := os.Stat(filepath.Join(path, "node.exe")); err != nil {
if _, err := os.Stat(filepath.Join(path, "node.exe")); err == nil {
problems = append(problems, "Another Node.js installation is blocking NVM4W installations from running. Please uninstall the conflicting version or update the PATH environment variable to assure \""+current+"\" precedes \""+path+"\".")
break
} else if !errors.Is(err, os.ErrNotExist) {