Skip to content

Commit

Permalink
improve the logic of running python
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Apr 17, 2024
1 parent 8baa152 commit 5ed161a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -971,8 +971,10 @@ public void runPythonIn( final String envName, final String... args ) throws IOE
List<String> argsList = new ArrayList<String>();
if ( envName.equals( DEFAULT_ENVIRONMENT_NAME ) )
argsList.add( PYTHON_COMMAND );
else if (new File(envName).isDirectory())
argsList.add( coverArgWithDoubleQuotes(Paths.get( envName, PYTHON_COMMAND ).toString()) );
else
argsList.add( coverArgWithDoubleQuotes(Paths.get( ENVS_NAME, envName, PYTHON_COMMAND ).toString()) );
argsList.add( coverArgWithDoubleQuotes(Paths.get( this.envsdir, envName, PYTHON_COMMAND ).toString()) );
argsList.addAll( Arrays.asList( args ).stream().map(aa -> {
if (aa.contains(" ") && PlatformDetection.isWindows()) return coverArgWithDoubleQuotes(aa);
else return aa;
Expand Down

0 comments on commit 5ed161a

Please sign in to comment.