mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
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
This commit is contained in:
parent
a53760b872
commit
bf0e4ba452
1 changed files with 8 additions and 4 deletions
|
|
@ -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 @@ namespace Flow.Launcher.Core.Plugin
|
|||
RedirectStandardOutput = true,
|
||||
RedirectStandardError = true
|
||||
};
|
||||
|
||||
// required initialisation for below request calls
|
||||
_startInfo.ArgumentList.Add(string.Empty);
|
||||
}
|
||||
|
||||
protected override Task<Stream> 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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue