aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Integrations/Scripts/ScriptService.cs
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2025-02-09 17:52:08 -0600
committerJP Dillingham <jp@dillingham.me>2025-02-09 17:52:08 -0600
commitc91439be2900c2a9d3401592b3417b63a4a497b8 (patch)
treefeb349f35858086d32d0c20e659d7977edc39c38 /src/slskd/Integrations/Scripts/ScriptService.cs
parent83bfe9e3b2999c4c34becd4868f7195b1cc84b1c (diff)
downloadslskd-c91439be2900c2a9d3401592b3417b63a4a497b8.tar.gz
rework process params
Diffstat (limited to 'src/slskd/Integrations/Scripts/ScriptService.cs')
-rw-r--r--src/slskd/Integrations/Scripts/ScriptService.cs12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/slskd/Integrations/Scripts/ScriptService.cs b/src/slskd/Integrations/Scripts/ScriptService.cs
index 2c1bc66d..28c8db77 100644
--- a/src/slskd/Integrations/Scripts/ScriptService.cs
+++ b/src/slskd/Integrations/Scripts/ScriptService.cs
@@ -102,21 +102,17 @@ public class ScriptService
StartInfo = new ProcessStartInfo(fileName: executable)
{
UseShellExecute = false,
+ CreateNoWindow = true,
RedirectStandardOutput = true,
RedirectStandardError = true,
- RedirectStandardInput = true,
+ Arguments = args,
},
};
+ process.StartInfo.Environment.Clear();
+ process.StartInfo.EnvironmentVariables["SLSKD_SCRIPT_DATA"] = data.ToJson();
process.Start();
- if (args is not null)
- {
- process.StandardInput.WriteLine(args);
- }
-
- process.StandardInput.WriteLine("exit");
-
process.WaitForExit();
sw.Stop();