This commit is contained in:
2020-06-06 18:55:21 +00:00
parent 92909bc1dd
commit 944989beae
4 changed files with 51 additions and 19 deletions

View File

@@ -25,7 +25,7 @@ namespace AyaNova.Util
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
return RunLinuxBash(cmd, arguments, waitForExitTimeOut);
return RunLinuxShell(cmd, arguments, waitForExitTimeOut);
}
}
catch (Exception ex)
@@ -77,7 +77,7 @@ namespace AyaNova.Util
}
}
private static string RunLinuxBash(string cmd, string arguments, int waitForExitTimeOut = int.MaxValue)
private static string RunLinuxShell(string cmd, string arguments, int waitForExitTimeOut = int.MaxValue)
{
var escapedArgs = $"{cmd} {arguments}".Replace("\"", "\\\"");
@@ -85,7 +85,7 @@ namespace AyaNova.Util
{
process.StartInfo = new ProcessStartInfo
{
FileName = "/bin/bash",
FileName = "/bin/sh",
Arguments = $"-c \"{escapedArgs}\"",
RedirectStandardOutput = true,
UseShellExecute = false,