Skip to content

Commit 0459d6e

Browse files
committed
fix v1 plugin issue
- Settings NullReference - ExecutablePlugin not working
1 parent 83a6110 commit 0459d6e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Flow.Launcher.Core/Plugin/ExecutablePlugin.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System.Diagnostics;
22
using System.IO;
3+
using System.Text.Json;
34
using System.Threading;
45
using System.Threading.Tasks;
56

@@ -27,14 +28,14 @@ public ExecutablePlugin(string filename)
2728
protected override Task<Stream> RequestAsync(JsonRPCRequestModel request, CancellationToken token = default)
2829
{
2930
// since this is not static, request strings will build up in ArgumentList if index is not specified
30-
_startInfo.ArgumentList[0] = request.ToString();
31+
_startInfo.ArgumentList[0] = JsonSerializer.Serialize(request, RequestSerializeOption);
3132
return ExecuteAsync(_startInfo, token);
3233
}
3334

3435
protected override string Request(JsonRPCRequestModel rpcRequest, CancellationToken token = default)
3536
{
3637
// since this is not static, request strings will build up in ArgumentList if index is not specified
37-
_startInfo.ArgumentList[0] = rpcRequest.ToString();
38+
_startInfo.ArgumentList[0] = JsonSerializer.Serialize(rpcRequest, RequestSerializeOption);
3839
return Execute(_startInfo);
3940
}
4041
}

Flow.Launcher.Core/Plugin/JsonRPCPlugin.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ public override async Task<List<Result>> QueryAsync(Query query, CancellationTok
256256
{
257257
query.Search
258258
},
259-
Settings.Inner);
259+
Settings?.Inner);
260260

261261
var output = await RequestAsync(request, token);
262262

0 commit comments

Comments
 (0)