diff --git a/Flow.Launcher.Core/Plugin/PluginsLoader.cs b/Flow.Launcher.Core/Plugin/PluginsLoader.cs index 7521742636a..47abef3bfdc 100644 --- a/Flow.Launcher.Core/Plugin/PluginsLoader.cs +++ b/Flow.Launcher.Core/Plugin/PluginsLoader.cs @@ -83,7 +83,10 @@ public static IEnumerable DotNetPlugins(List source) return; } - plugins.Add(new PluginPair {Plugin = plugin, Metadata = metadata}); + plugins.Add(new PluginPair + { + Plugin = plugin, Metadata = metadata + }); }); metadata.InitTime += milliseconds; } @@ -114,10 +117,12 @@ public static IEnumerable PythonPlugins(List source, return new List(); if (!string.IsNullOrEmpty(settings.PythonDirectory) && FilesFolders.LocationExists(settings.PythonDirectory)) + { + Constant.PythonPath = settings.PythonDirectory; return SetPythonPathForPluginPairs(source, Path.Combine(settings.PythonDirectory, PythonExecutable)); - + } var pythonPath = string.Empty; - + if (MessageBox.Show("Flow detected you have installed Python plugins, which " + "will need Python to run. Would you like to download Python? " + Environment.NewLine + Environment.NewLine + @@ -186,16 +191,15 @@ public static IEnumerable PythonPlugins(List source, } private static IEnumerable SetPythonPathForPluginPairs(List source, string pythonPath) - => source + => source .Where(o => o.Language.ToUpper() == AllowedLanguage.Python) .Select(metadata => new PluginPair { - Plugin = new PythonPlugin(pythonPath), - Metadata = metadata + Plugin = new PythonPlugin(pythonPath), Metadata = metadata }) .ToList(); - public static IEnumerable ExecutablePlugins(IEnumerable source) + public static IEnumerable ExecutablePlugins(IEnumerable source) { return source .Where(o => o.Language.ToUpper() == AllowedLanguage.Executable)