Skip to content

Commit

Permalink
fix: read property to determine if using python virtual env
Browse files Browse the repository at this point in the history
  • Loading branch information
xieshenzh committed Oct 18, 2023
1 parent 270a8bb commit 80030c8
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,9 @@ private PythonControllerBase getPythonController() {
String[] parts = pythonPipBinaries.split(";;");
var python = parts[0];
var pip = parts[1];
String useVirtualPythonEnv = Objects.requireNonNullElse(System.getenv("EXHORT_PYTHON_VIRTUAL_ENV"), "false");
String useVirtualPythonEnv = Objects.requireNonNullElseGet(
System.getenv("EXHORT_PYTHON_VIRTUAL_ENV"),
() -> Objects.requireNonNullElse(System.getProperty("EXHORT_PYTHON_VIRTUAL_ENV"), "false"));
PythonControllerBase pythonController;
if(this.pythonController == null) {
if (Boolean.parseBoolean(useVirtualPythonEnv)) {
Expand Down

0 comments on commit 80030c8

Please sign in to comment.