diff options
| author | JP Dillingham <jp@dillingham.me> | 2026-10-23 14:59:10 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2026-10-23 14:59:10 -0500 |
| commit | 376b2378380b7d39fd0947c35cab0a636662b372 (patch) | |
| tree | 2f685e91e2b3026d772f809599824b196d071d7f /src | |
| parent | a3efee00cc7a269f23b6f71564cc577e83533519 (diff) | |
| download | slskd-376b2378380b7d39fd0947c35cab0a636662b372.tar.gz | |
couple of tweaks
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() |
