From 2dcd4d7b9ce3a95ff5e9dd91e50fc8e1234484b7 Mon Sep 17 00:00:00 2001 From: Jeremy Date: Fri, 28 Oct 2022 20:25:51 +1100 Subject: [PATCH] centralise all plugin env folders in Environments directory --- Flow.Launcher.Core/ExternalPlugins/PluginEnvironment.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Flow.Launcher.Core/ExternalPlugins/PluginEnvironment.cs b/Flow.Launcher.Core/ExternalPlugins/PluginEnvironment.cs index d3ee24e72..52b20a9d2 100644 --- a/Flow.Launcher.Core/ExternalPlugins/PluginEnvironment.cs +++ b/Flow.Launcher.Core/ExternalPlugins/PluginEnvironment.cs @@ -134,10 +134,12 @@ namespace Flow.Launcher.Core.ExternalPlugins private void InstallEnvironment(string languageType) { + var environments = "Environments"; + switch (languageType) - {//TODO: UPDATE TO USE CENTRALISED PLUGINENVIRONMENT FOLDER + { case AllowedLanguage.Python: - var pythonDirPath = Path.Combine(DataLocation.DataDirectory(), "PythonEmbeddable"); + var pythonDirPath = Path.Combine(DataLocation.DataDirectory(), environments, "PythonEmbeddable"); FilesFolders.RemoveFolderIfExists(pythonDirPath); // Python 3.8.9 is used for Windows 7 compatibility @@ -148,7 +150,7 @@ namespace Flow.Launcher.Core.ExternalPlugins case AllowedLanguage.TypeScript: case AllowedLanguage.JavaScript: - var nodeDirPath = Path.Combine(DataLocation.DataDirectory(), "Node"); + var nodeDirPath = Path.Combine(DataLocation.DataDirectory(), environments, "Node"); FilesFolders.RemoveFolderIfExists(nodeDirPath); DroplexPackage.Drop(App.nodejs_16_18_0, nodeDirPath).Wait();