Move working directary setting to init

This commit is contained in:
Kevin Zhang 2021-08-14 06:51:11 +08:00
parent 991b89ff44
commit 8ae13a5473

View file

@ -36,9 +36,6 @@ namespace Flow.Launcher.Core.Plugin
{
_startInfo.ArgumentList[2] = request.ToString();
// todo happlebao why context can't be used in constructor
_startInfo.WorkingDirectory = context.CurrentPluginMetadata.PluginDirectory;
return ExecuteAsync(_startInfo, token);
}
@ -54,6 +51,9 @@ namespace Flow.Launcher.Core.Plugin
this.context = context;
_startInfo.ArgumentList.Add(context.CurrentPluginMetadata.ExecuteFilePath);
_startInfo.ArgumentList.Add("");
_startInfo.WorkingDirectory = context.CurrentPluginMetadata.PluginDirectory;
return Task.CompletedTask;
}
}