From 5287b28a1cc259c990002322185529a036862cdc Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Thu, 29 May 2025 15:04:39 +0200 Subject: [PATCH] Refactored pandoc executable name to use a property --- app/MindWork AI Studio/Tools/Pandoc.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/MindWork AI Studio/Tools/Pandoc.cs b/app/MindWork AI Studio/Tools/Pandoc.cs index 0efa5903..dae11867 100644 --- a/app/MindWork AI Studio/Tools/Pandoc.cs +++ b/app/MindWork AI Studio/Tools/Pandoc.cs @@ -47,7 +47,7 @@ public static partial class Pandoc { var startInfo = new ProcessStartInfo { - FileName = GetPandocExecutableName(), + FileName = PandocExecutableName, Arguments = "--version", RedirectStandardOutput = true, UseShellExecute = false, @@ -300,10 +300,9 @@ public static partial class Pandoc } /// - /// Reads the os platform to determine the used executable name + /// Reads the os platform to determine the used executable name. /// - /// Name of the pandoc executable - private static string GetPandocExecutableName() => CPU_ARCHITECTURE is RID.WIN_ARM64 ? "pandoc.exe" : "pandoc"; + private static string PandocExecutableName => CPU_ARCHITECTURE is RID.WIN_ARM64 or RID.WIN_X64 ? "pandoc.exe" : "pandoc"; private static async Task GetPandocDataFolder(RustService rustService) => Path.Join(await rustService.GetDataDirectory(), "pandoc");