Skip to content

Commit 1de2bee

Browse files
fhrbatamfialaf
authored andcommitted
fix(tools): honor IDF_PYTHON_ENV_PATH value
The active.py script is currently clearing the IDF_PYTHON_ENV_PATH, preventing it from being set to a custom location for the python virtual environment directory. Although the install script checks to ensure that an existing python virtual environment is not overwritten with one for a different ESP-IDF version than it was originally created for, we should still permit setting a custom path for the python virtual environment. Closes espressif#15006 Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
1 parent 1fa9db5 commit 1de2bee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tools/activate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ def die(msg: str) -> None:
4444

4545
try:
4646
run([virtualenv_python, os.path.join(idf_path, 'tools', 'export_utils', 'activate_venv.py')] + sys.argv[1:], check=True, env=os.environ.copy())
47-
except (OSError, SubprocessError):
48-
die('\n'.join(['Activation script failed',
47+
except (OSError, SubprocessError) as e:
48+
die('\n'.join(['Activation script failed', str(e),
4949
'To view detailed debug information, set ESP_IDF_EXPORT_DEBUG=1 and run the export script again.']))

0 commit comments

Comments
 (0)