Skip to content

Commit 53d2762

Browse files
author
Fraser Greenroyd
authored
Engine: BasePythonEnvironment boolean run (#131)
2 parents 49ed469 + bff88f4 commit 53d2762

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Python_Engine/Compute/BasePythonEnvironment.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,19 @@ public static partial class Compute
3535
{
3636
[Description("Retrieve or reinstall the base Python Environment for BHoM workflows.")]
3737
[Input("reload", "Reload the base Python environment rather than recreating it, if it already exists.")]
38+
[Input("run", "Start the installation/retrieval of the BHoM Base Python Environment.")]
3839
[Output("env", "The base Python Environment for all BHoM workflows.")]
40+
[PreviousVersion("7.0", "BH.Engine.Python.Compute.BasePythonEnvironment(System.Boolean)")]
3941
public static PythonEnvironment BasePythonEnvironment(
40-
bool reload = true
42+
bool reload = true,
43+
bool run = false
4144
)
4245
{
46+
if (!run)
47+
{
48+
return null;
49+
}
50+
4351
if (!Directory.Exists(Query.DirectoryEnvironments()))
4452
{
4553
// create PythonEnvironments directory if it doesnt already exist

0 commit comments

Comments
 (0)