diff --git a/StabilityMatrix.Core/Models/Packages/BaseGitPackage.cs b/StabilityMatrix.Core/Models/Packages/BaseGitPackage.cs
index 025f87e2..9a158085 100644
--- a/StabilityMatrix.Core/Models/Packages/BaseGitPackage.cs
+++ b/StabilityMatrix.Core/Models/Packages/BaseGitPackage.cs
@@ -105,13 +105,13 @@ public abstract class BaseGitPackage : BasePackage
///
/// Setup the virtual environment for the package.
///
- ///
- ///
- ///
[MemberNotNull(nameof(VenvRunner))]
- protected async Task SetupVenv(string installedPackagePath, string venvName = "venv")
+ public async Task SetupVenv(
+ string installedPackagePath,
+ string venvName = "venv",
+ bool forceRecreate = false)
{
- var venvPath = Path.Combine(installedPackagePath, "venv");
+ var venvPath = Path.Combine(installedPackagePath, venvName);
if (VenvRunner != null)
{
await VenvRunner.DisposeAsync().ConfigureAwait(false);
@@ -123,9 +123,9 @@ public abstract class BaseGitPackage : BasePackage
EnvironmentVariables = SettingsManager.Settings.EnvironmentVariables,
};
- if (!VenvRunner.Exists())
+ if (!VenvRunner.Exists() || forceRecreate)
{
- await VenvRunner.Setup().ConfigureAwait(false);
+ await VenvRunner.Setup(forceRecreate).ConfigureAwait(false);
}
return VenvRunner;
}