1
0
forked from VimPlug/jedi

Fix environment cache regression (#1238)

The only remaining issue with this PR is that it does compare with executable instead of _start_executable (they don't need to be the same).
This commit is contained in:
Bet4
2018-12-16 01:37:29 +08:00
committed by Dave Halter
parent 368bf7e58a
commit 76417cc3c1

View File

@@ -190,8 +190,9 @@ def get_default_environment():
def get_cached_default_environment():
var = os.environ.get('VIRTUAL_ENV')
environment = _get_cached_default_environment()
if environment.path != os.environ.get('VIRTUAL_ENV'):
if var and var != environment.path:
_get_cached_default_environment.clear_cache()
return _get_cached_default_environment()
return environment