Setting environment variables when activating conda env
Conda packages can have scripts to set and unset environment variables when the environment is activated and deactivated.
https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#saving-environment-variables
These get added to .CondaPkg/env/etc/conda/activate.d/ and .CondaPkg/env/etc/conda/deactivate.d/
Currently from what I can tell CondaPkg.withenv(f::Function) doesn't run these scripts.
Indeed, most Conda packages do not use this feature, so it hasn't been implemented by CondaPkg.
Are there particular packages you're having issue with.
I had issues using the quarto package. But looking into this issue more, I have no idea how actually to fix this in Julia, (besides some super hacky workarounds to try and parse .bat and .sh scripts).
It would probably be easier to fix the quarto conda package instead.
Indeed, an earlier version of CondaPkg did this, but it was not super reliable. It could be reimplemented though.