Skip to content

Commit 4f54226

Browse files
committed
Fix for Rubjerg/Graphviz.NetWrapper 115
1 parent e6bbd61 commit 4f54226

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Rubjerg.Graphviz/GraphvizCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ internal static string Rid
4343
Path.GetDirectoryName(AppContext.BaseDirectory),
4444
""
4545
];
46-
return possibleLocations.Select(dir => Path.Combine(dir, "dot")).FirstOrDefault(File.Exists)
47-
?? possibleLocations.Select(dir => Path.Combine(dir, "dot.exe")).FirstOrDefault(File.Exists)
46+
return possibleLocations.Where(d => !string.IsNullOrWhiteSpace(d)).Select(dir => Path.Combine(dir, "dot")).FirstOrDefault(File.Exists)
47+
?? possibleLocations.Where(d => !string.IsNullOrWhiteSpace(d)).Select(dir => Path.Combine(dir, "dot.exe")).FirstOrDefault(File.Exists)
4848
?? throw new InvalidOperationException("Could not find path to dot binary in any of: " + string.Join(", ", possibleLocations));
4949
});
5050
internal static string DotExePath => _DotExePath.Value;

0 commit comments

Comments
 (0)