Skip to content

Commit

Permalink
remove unnecessary cmd.exe /C and actually adding the list of argumen…
Browse files Browse the repository at this point in the history
…ts so it can work with venv !!!
  • Loading branch information
romainGuiet committed Oct 2, 2024
1 parent db3a82a commit 1b18cb4
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,12 @@ public static void execute(String envDirPath, String envType, List<String> argum
} else if (envType.equals("venv")) { // venv

if (IJ.isWindows()) {
List<String> venv_activate_cmd = Arrays.asList("cmd.exe", "/C", new File(envDirPath, "Scripts/activate").toString());
List<String> venv_activate_cmd = Arrays.asList(new File(envDirPath, "Scripts/activate").toString());
cmd.addAll(venv_activate_cmd);
cmd.add("&");// to have a second command
List<String> module_args_cmd = Arrays.asList("python", "-Xutf8");
cmd.addAll(module_args_cmd);
cmd.addAll(arguments);
} else if (IJ.isMacOSX() || IJ.isLinux()) {
throw new UnsupportedOperationException("Mac/Unix not supported yet with virtual environment. Please try conda instead.");
}
Expand Down

0 comments on commit 1b18cb4

Please sign in to comment.