check runtime
All checks were successful
Build & Deploy Retirement Service / build (push) Successful in 1m47s
All checks were successful
Build & Deploy Retirement Service / build (push) Successful in 1m47s
This commit is contained in:
parent
2e9db2d42c
commit
c035c13405
1 changed files with 7 additions and 2 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue