Try to use the virtual env that was defined in the VIRTUAL_ENV variable, if possible.
This commit is contained in:
1 parent
bcb3f02a01
commit
9c5ce5a8d2
2 files changed
+28
No files matched your search
@@ -97,6 +97,12 @@ class InterpreterEnvironment(_BaseEnvironment):
|
||||
|
||||
|
||||
def get_default_environment():
|
||||
virtual_env = os.environ.get('VIRTUAL_ENV')
|
||||
if virtual_env is not None and virtual_env != sys.prefix:
|
||||
try:
|
||||
return create_environment(virtual_env)
|
||||
except InvalidPythonEnvironment:
|
||||
pass
|
||||
return DefaultEnvironment()
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user