mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-08-21 04:12:56 +00:00
Refactored pandoc executable name to use a property
This commit is contained in:
parent
04db15847e
commit
5287b28a1c
@ -47,7 +47,7 @@ public static partial class Pandoc
|
|||||||
{
|
{
|
||||||
var startInfo = new ProcessStartInfo
|
var startInfo = new ProcessStartInfo
|
||||||
{
|
{
|
||||||
FileName = GetPandocExecutableName(),
|
FileName = PandocExecutableName,
|
||||||
Arguments = "--version",
|
Arguments = "--version",
|
||||||
RedirectStandardOutput = true,
|
RedirectStandardOutput = true,
|
||||||
UseShellExecute = false,
|
UseShellExecute = false,
|
||||||
@ -300,10 +300,9 @@ public static partial class Pandoc
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads the os platform to determine the used executable name
|
/// Reads the os platform to determine the used executable name.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>Name of the pandoc executable</returns>
|
private static string PandocExecutableName => CPU_ARCHITECTURE is RID.WIN_ARM64 or RID.WIN_X64 ? "pandoc.exe" : "pandoc";
|
||||||
private static string GetPandocExecutableName() => CPU_ARCHITECTURE is RID.WIN_ARM64 ? "pandoc.exe" : "pandoc";
|
|
||||||
|
|
||||||
private static async Task<string> GetPandocDataFolder(RustService rustService) => Path.Join(await rustService.GetDataDirectory(), "pandoc");
|
private static async Task<string> GetPandocDataFolder(RustService rustService) => Path.Join(await rustService.GetDataDirectory(), "pandoc");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user