File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed
src/main/java/org/scijava/plugins/scripting/python Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -145,18 +145,25 @@ public void load() {
145145 }
146146
147147 public void rebuildEnv () {
148- // Use scijava.app.python-env-file system property if present.
148+ File environmentYaml = getEnvironmentYamlFile ();
149+ commandService .run (RebuildEnvironment .class , true , "environmentYaml" ,
150+ environmentYaml , "targetDir" , pythonDir );
151+ }
152+
153+ /**
154+ * Returns the File for the environment.yml, using the system property if set.
155+ */
156+ private File getEnvironmentYamlFile () {
149157 final Path appPath = appService .getApp ().getBaseDirectory ().toPath ();
150158 File environmentYaml = appPath .resolve ("config" ).resolve ("environment.yml" )
151159 .toFile ();
152160 final String pythonEnvFileProp = System .getProperty (
153161 "scijava.app.python-env-file" );
154162 if (pythonEnvFileProp != null ) {
155- environmentYaml = OptionsPython . stringToFile (appPath , pythonEnvFileProp );
163+ environmentYaml = stringToFile (appPath , pythonEnvFileProp );
156164 }
165+ return environmentYaml ;
157166
158- commandService .run (RebuildEnvironment .class , true , "environmentYaml" ,
159- environmentYaml , "targetDir" , pythonDir );
160167 }
161168
162169 @ Override
You can’t perform that action at this time.
0 commit comments