From a53760b8728be1cc3cc9a3b3621e210679757c3a Mon Sep 17 00:00:00 2001 From: Jeremy Date: Wed, 22 Dec 2021 21:22:21 +1100 Subject: [PATCH 1/2] formatting --- Flow.Launcher.Core/Plugin/ExecutablePlugin.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher.Core/Plugin/ExecutablePlugin.cs b/Flow.Launcher.Core/Plugin/ExecutablePlugin.cs index 0982e401715..44eff9fbe44 100644 --- a/Flow.Launcher.Core/Plugin/ExecutablePlugin.cs +++ b/Flow.Launcher.Core/Plugin/ExecutablePlugin.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Diagnostics; using System.IO; using System.Threading; @@ -36,4 +36,4 @@ protected override string Request(JsonRPCRequestModel rpcRequest, CancellationTo return Execute(_startInfo); } } -} \ No newline at end of file +} From bf0e4ba452871ae01b37518fb1ef8f1ebe1e7c32 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Fri, 24 Dec 2021 19:07:51 +1100 Subject: [PATCH 2/2] fix Executable plugin's JsonRPC request string This is a fix of Executable plugin's JsonRPC request string for ProcessStartInfo, but tested and should be used specifically for Typescript + JavaScript plugin --- Flow.Launcher.Core/Plugin/ExecutablePlugin.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Flow.Launcher.Core/Plugin/ExecutablePlugin.cs b/Flow.Launcher.Core/Plugin/ExecutablePlugin.cs index 44eff9fbe44..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,17 +21,22 @@ 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); } }