check runtime
All checks were successful
Build & Deploy Retirement Service / build (push) Successful in 1m47s

This commit is contained in:
harid 2026-04-20 14:31:28 +07:00
parent 2e9db2d42c
commit c035c13405

View file

@ -205,10 +205,15 @@ namespace BMA.EHR.Retirement.Service.Services
// Run LibreOffice inside Docker container
var dockerCmd = $"docker exec {container} libreoffice {arguments} --outdir {dockerFilesPath} {dockerFilesPath}/{fileName}";
var isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
var shell = isWindows ? "cmd.exe" : "/bin/sh";
var shellArg = isWindows ? "/c" : "-c";
var psi = new ProcessStartInfo
{
FileName = "cmd.exe",
Arguments = $"/c \"{dockerCmd}\"",
FileName = shell,
Arguments = $"{shellArg} \"{dockerCmd}\"",
UseShellExecute = false,
RedirectStandardOutput = true,
RedirectStandardError = true,