Skip to content

Commit 8ae13a5

Browse files
committed
Move working directary setting to init
1 parent 991b89f commit 8ae13a5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Flow.Launcher.Core/Plugin/PythonPlugin.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ protected override Task<Stream> RequestAsync(JsonRPCRequestModel request, Cancel
3636
{
3737
_startInfo.ArgumentList[2] = request.ToString();
3838

39-
// todo happlebao why context can't be used in constructor
40-
_startInfo.WorkingDirectory = context.CurrentPluginMetadata.PluginDirectory;
41-
4239
return ExecuteAsync(_startInfo, token);
4340
}
4441

@@ -54,6 +51,9 @@ public override Task InitAsync(PluginInitContext context)
5451
this.context = context;
5552
_startInfo.ArgumentList.Add(context.CurrentPluginMetadata.ExecuteFilePath);
5653
_startInfo.ArgumentList.Add("");
54+
55+
_startInfo.WorkingDirectory = context.CurrentPluginMetadata.PluginDirectory;
56+
5757
return Task.CompletedTask;
5858
}
5959
}

0 commit comments

Comments
 (0)