I just updated my solution to the 3.0.3 version, and getting an error in line 46 of GraphVizCommand.cs. System.IO.Path.Combine fails because the first parameter is sometimes null.
The following code should fix this problem as it does some null filtering:
return possibleLocations.Where(d => !string.IsNullOrWhiteSpace(d)).Select(dir => Path.Combine(dir, "dot")).FirstOrDefault(File.Exists)
?? possibleLocations.Where(d => !string.IsNullOrWhiteSpace(d)).Select(dir => Path.Combine(dir, "dot.exe")).FirstOrDefault(File.Exists)
?? throw new InvalidOperationException("Could not find path to dot binary in any of: " + string.Join(", ", possibleLocations));
Possible to get this reviewed, added, and a new package released?
I just updated my solution to the 3.0.3 version, and getting an error in line 46 of GraphVizCommand.cs. System.IO.Path.Combine fails because the first parameter is sometimes null.
The following code should fix this problem as it does some null filtering:
return possibleLocations.Where(d => !string.IsNullOrWhiteSpace(d)).Select(dir => Path.Combine(dir, "dot")).FirstOrDefault(File.Exists)
?? possibleLocations.Where(d => !string.IsNullOrWhiteSpace(d)).Select(dir => Path.Combine(dir, "dot.exe")).FirstOrDefault(File.Exists)
?? throw new InvalidOperationException("Could not find path to dot binary in any of: " + string.Join(", ", possibleLocations));
Possible to get this reviewed, added, and a new package released?