From 74970a6673b3cf522ec60aa70ff52ca0f95fe839 Mon Sep 17 00:00:00 2001 From: Yusyuriv Date: Sat, 10 Feb 2024 19:59:52 +0600 Subject: [PATCH] Fix Nodejs plugins not working --- Flow.Launcher.Core/Plugin/NodePlugin.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher.Core/Plugin/NodePlugin.cs b/Flow.Launcher.Core/Plugin/NodePlugin.cs index 40eb057cb..aeac18ca9 100644 --- a/Flow.Launcher.Core/Plugin/NodePlugin.cs +++ b/Flow.Launcher.Core/Plugin/NodePlugin.cs @@ -28,20 +28,21 @@ namespace Flow.Launcher.Core.Plugin protected override Task RequestAsync(JsonRPCRequestModel request, CancellationToken token = default) { - _startInfo.ArgumentList[1] = JsonSerializer.Serialize(request); + _startInfo.ArgumentList[1] = 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[1] = JsonSerializer.Serialize(rpcRequest); + _startInfo.ArgumentList[1] = JsonSerializer.Serialize(rpcRequest, RequestSerializeOption); return Execute(_startInfo); } public override async Task InitAsync(PluginInitContext context) { _startInfo.ArgumentList.Add(context.CurrentPluginMetadata.ExecuteFilePath); + _startInfo.ArgumentList.Add(string.Empty); _startInfo.WorkingDirectory = context.CurrentPluginMetadata.PluginDirectory; await base.InitAsync(context); }