From 03265e1a8429adfb0d087f87570aa46dcaa15075 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Mon, 17 Feb 2025 14:15:34 -0600 Subject: add DefaultCommandPrefix --- src/slskd/Integrations/Scripts/ScriptService.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/slskd/Integrations/Scripts') diff --git a/src/slskd/Integrations/Scripts/ScriptService.cs b/src/slskd/Integrations/Scripts/ScriptService.cs index 1a010a80..091ea05d 100644 --- a/src/slskd/Integrations/Scripts/ScriptService.cs +++ b/src/slskd/Integrations/Scripts/ScriptService.cs @@ -42,10 +42,12 @@ public class ScriptService if (OperatingSystem.IsWindows()) { DefaultExecutable = "cmd.exe"; + DefaultCommandPrefix = "/c"; } else { DefaultExecutable = Environment.GetEnvironmentVariable("SHELL"); + DefaultCommandPrefix = "-c"; if (string.IsNullOrEmpty(DefaultExecutable)) { @@ -61,6 +63,7 @@ public class ScriptService private IOptionsMonitor OptionsMonitor { get; } private EventBus Events { get; } private string DefaultExecutable { get; } + private string DefaultCommandPrefix { get; } private async Task HandleEvent(Event data) { -- cgit v1.2.3