This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user