diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Common/Dumper.cs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/slskd/Common/Dumper.cs b/src/slskd/Common/Dumper.cs index 27304873..8797d040 100644 --- a/src/slskd/Common/Dumper.cs +++ b/src/slskd/Common/Dumper.cs @@ -86,10 +86,10 @@ namespace slskd if (!System.OperatingSystem.IsWindows()) { - await ExecAsync("/bin/sh", $"-c \"chmod +x {BinFile}\""); + await ExecAsync("/bin/chmod", $"+x \"{BinFile}\""); } - await ExecAsync(BinFile, $"collect --process-id {Environment.ProcessId} --type full --output {outputFile}"); + await ExecAsync(BinFile, $"collect --process-id {Environment.ProcessId} --type full --output \"{outputFile}\""); return outputFile; } @@ -124,6 +124,11 @@ namespace slskd process.StartInfo.Arguments = args; process.Start(); await process.WaitForExitAsync(); + + if (process.ExitCode != 0) + { + throw new SlskdException($"'{bin}' exited with code {process.ExitCode}"); + } } private string GetRID() |
