Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions Nodejs/Product/Nodejs/Nodejs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,12 @@ public static string GetPathToNodeExecutableFromEnvironment(string executable =

// If we didn't find node.js in the registry we should look at the user's path.
foreach (var dir in Environment.GetEnvironmentVariable("PATH").Split(Path.PathSeparator)) {
var execPath = Path.Combine(dir, executable);
if (File.Exists(execPath)) {
return execPath;
}
try {
var execPath = Path.Combine(dir, executable);
if (File.Exists(execPath)) {
return execPath;
}
} catch (ArgumentException) { /*noop*/ }
}

// It wasn't in the users path. Check Program Files for the nodejs folder.
Expand Down