mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge c25b563061
into 46acfdce96
This commit is contained in:
commit
c600bf7e30
@ -2574,7 +2574,7 @@ def action_install_python_env(args): # type: ignore
|
|||||||
reinstall = args.reinstall
|
reinstall = args.reinstall
|
||||||
idf_python_env_path, _, virtualenv_python, idf_version = get_python_env_path()
|
idf_python_env_path, _, virtualenv_python, idf_version = get_python_env_path()
|
||||||
|
|
||||||
is_virtualenv = hasattr(sys, 'real_prefix') or (hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix)
|
is_virtualenv = 'VIRTUAL_ENV' in os.environ
|
||||||
if is_virtualenv and (not os.path.exists(idf_python_env_path) or reinstall):
|
if is_virtualenv and (not os.path.exists(idf_python_env_path) or reinstall):
|
||||||
fatal('This script was called from a virtual environment, can not create a virtual environment again')
|
fatal('This script was called from a virtual environment, can not create a virtual environment again')
|
||||||
raise SystemExit(1)
|
raise SystemExit(1)
|
||||||
|
Loading…
Reference in New Issue
Block a user