mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-19 23:09:43 +08:00
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():
|
def get_cached_default_environment():
|
||||||
|
var = os.environ.get('VIRTUAL_ENV')
|
||||||
environment = _get_cached_default_environment()
|
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()
|
_get_cached_default_environment.clear_cache()
|
||||||
return _get_cached_default_environment()
|
return _get_cached_default_environment()
|
||||||
return environment
|
return environment
|
||||||
|
|||||||
Reference in New Issue
Block a user