jdx / mise

dev tools, env vars, task runner
https://mise.jdx.dev
MIT License
8.03k stars 210 forks source link

clear env set in _.source when cd out mise.toml dir #2299

Open i18n-now opened 2 weeks ago

i18n-now commented 2 weeks ago

I think mise should monitor the environment variables added, deleted, and modified by the _.source, and restore them when exiting the directory.

I think the implementation is very simple. directly save all the environment variables before modification as a hash dictionary. When exiting the directory, delete the newly added environment variables and restore the changed and deleted environment variables.