fix v1 plugin issue

- Settings NullReference
- ExecutablePlugin not working
This commit is contained in:
Hongtao Zhang 2023-07-03 12:58:44 +08:00
parent 83a61109d7
commit 0459d6e4fa
2 changed files with 4 additions and 3 deletions

View file

@ -1,5 +1,6 @@
using System.Diagnostics;
using System.IO;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
@ -27,14 +28,14 @@ namespace Flow.Launcher.Core.Plugin
protected override Task<Stream> RequestAsync(JsonRPCRequestModel request, CancellationToken token = default)
{
// since this is not static, request strings will build up in ArgumentList if index is not specified
_startInfo.ArgumentList[0] = request.ToString();
_startInfo.ArgumentList[0] = JsonSerializer.Serialize(request, RequestSerializeOption);
return ExecuteAsync(_startInfo, token);
}
protected override string Request(JsonRPCRequestModel rpcRequest, CancellationToken token = default)
{
// since this is not static, request strings will build up in ArgumentList if index is not specified
_startInfo.ArgumentList[0] = rpcRequest.ToString();
_startInfo.ArgumentList[0] = JsonSerializer.Serialize(rpcRequest, RequestSerializeOption);
return Execute(_startInfo);
}
}

View file

@ -256,7 +256,7 @@ namespace Flow.Launcher.Core.Plugin
{
query.Search
},
Settings.Inner);
Settings?.Inner);
var output = await RequestAsync(request, token);