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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user