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
5 changes: 3 additions & 2 deletions Rubjerg.Graphviz/GraphvizCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ internal static string Rid
Path.GetDirectoryName(AppContext.BaseDirectory),
""
];
return possibleLocations.Select(dir => Path.Combine(dir, "dot")).FirstOrDefault(File.Exists)
?? possibleLocations.Select(dir => Path.Combine(dir, "dot.exe")).FirstOrDefault(File.Exists)
return possibleLocations.Where(d => d != null).Select(dir => Path.Combine(dir, "dot")).FirstOrDefault(File.Exists)
?? possibleLocations.Where(d => d != null).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));
});
internal static string DotExePath => _DotExePath.Value;
Expand Down Expand Up @@ -129,3 +129,4 @@ public static (byte[] stdout, string stderr) Exec(Graph input, string format = "
}
}
}

Loading