diff --git a/Flow.Launcher.Core/Plugin/ExecutablePlugin.cs b/Flow.Launcher.Core/Plugin/ExecutablePlugin.cs index 0982e401715..049d1c5833e 100644 --- a/Flow.Launcher.Core/Plugin/ExecutablePlugin.cs +++ b/Flow.Launcher.Core/Plugin/ExecutablePlugin.cs @@ -1,5 +1,4 @@ -using System; -using System.Diagnostics; +using System.Diagnostics; using System.IO; using System.Threading; using System.Threading.Tasks; @@ -22,18 +21,23 @@ public ExecutablePlugin(string filename) RedirectStandardOutput = true, RedirectStandardError = true }; + + // required initialisation for below request calls + _startInfo.ArgumentList.Add(string.Empty); } protected override Task RequestAsync(JsonRPCRequestModel request, CancellationToken token = default) { - _startInfo.Arguments = $"\"{request}\""; + // since this is not static, request strings will build up in ArgumentList if index is not specified + _startInfo.ArgumentList[0] = request.ToString(); return ExecuteAsync(_startInfo, token); } protected override string Request(JsonRPCRequestModel rpcRequest, CancellationToken token = default) { - _startInfo.Arguments = $"\"{rpcRequest}\""; + // since this is not static, request strings will build up in ArgumentList if index is not specified + _startInfo.ArgumentList[0] = rpcRequest.ToString(); return Execute(_startInfo); } } -} \ No newline at end of file +}