Skip to content

Commit 2dcd4d7

Browse files
committed
centralise all plugin env folders in Environments directory
1 parent f76e296 commit 2dcd4d7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Flow.Launcher.Core/ExternalPlugins/PluginEnvironment.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,12 @@ private IEnumerable<PluginPair> Setup(string languageType, string environment)
134134

135135
private void InstallEnvironment(string languageType)
136136
{
137+
var environments = "Environments";
138+
137139
switch (languageType)
138-
{//TODO: UPDATE TO USE CENTRALISED PLUGINENVIRONMENT FOLDER
140+
{
139141
case AllowedLanguage.Python:
140-
var pythonDirPath = Path.Combine(DataLocation.DataDirectory(), "PythonEmbeddable");
142+
var pythonDirPath = Path.Combine(DataLocation.DataDirectory(), environments, "PythonEmbeddable");
141143
FilesFolders.RemoveFolderIfExists(pythonDirPath);
142144

143145
// Python 3.8.9 is used for Windows 7 compatibility
@@ -148,7 +150,7 @@ private void InstallEnvironment(string languageType)
148150

149151
case AllowedLanguage.TypeScript:
150152
case AllowedLanguage.JavaScript:
151-
var nodeDirPath = Path.Combine(DataLocation.DataDirectory(), "Node");
153+
var nodeDirPath = Path.Combine(DataLocation.DataDirectory(), environments, "Node");
152154
FilesFolders.RemoveFolderIfExists(nodeDirPath);
153155

154156
DroplexPackage.Drop(App.nodejs_16_18_0, nodeDirPath).Wait();

0 commit comments

Comments
 (0)