Skip to content

Commit 6889041

Browse files
committed
Clear cache for get_user_environment_variables when changing system to ensure next call will retrieve the new change
1 parent 697827f commit 6889041

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: spyder/utils/environ.py

+2
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,11 @@ def set_user_env(env, parent=None):
170170
"Please restart this Windows <i>session</i> "
171171
"(not the computer) for changes to take effect.")
172172
)
173+
get_user_environment_variables.cache_clear()
173174
elif os.name == 'posix' and running_in_ci():
174175
text = "\n".join([f"export {k}={v}" for k, v in env_dict.items()])
175176
amend_user_shell_init(text)
177+
get_user_environment_variables.cache_clear()
176178
else:
177179
raise NotImplementedError("Not implemented for platform %s", os.name)
178180

0 commit comments

Comments
 (0)