mamba icon indicating copy to clipboard operation
mamba copied to clipboard

Add mechanism to control wether global files `~/.conda/environments.txt` are written to or not

Open wolfv opened this issue 2 years ago • 5 comments

Troubleshooting docs

  • [X] My problem is not solved in the Troubleshooting docs

How did you install Mamba?

Micromamba

Search tried in issue tracker

NA

Latest version of Mamba

  • [X] My problem is not solved with the latest version

Tried in Conda?

Not applicable

Describe your issue

micromamba notes down all environments in the ~/.conda/environments.txt global file.

Some people that use micromamba more programatically do not like that it writes to a global file. We could add a boolean variable to the configuration that controls this behavior and prevents micromamba from writing to this file.

mamba info / micromamba info

No response

Logs

No response

environment.yml

No response

~/.condarc

No response

wolfv avatar Aug 25 '23 07:08 wolfv

This would be nice!

Not micromamba-specific, but I literally have code in my .bashrc to scrub environments.txt of what should otherwise be hidden environments (e.g., Snakemake environments). It would be helpful if we could be more deliberate about what we want exposed to the interactive user via environments.txt.

mfansler avatar Aug 26 '23 02:08 mfansler

Check https://github.com/conda/conda/pull/12924. I think we can agree on the same context key (register_envs) to avoid duplication.

jaimergp avatar Aug 29 '23 21:08 jaimergp

Added https://github.com/mamba-org/mamba/pull/2802

jaimergp avatar Aug 31 '23 15:08 jaimergp

@jaimergp I think we still need to wire this up to CLI / config file reading etc., right?

wolfv avatar Sep 01 '23 05:09 wolfv

No clue. In conda adding it to the context object exposes it in the config file and the env var, and I didn't add it as a CLI flag. I am guessing now that it's not that magic here in mambaland so let me know what needs to be done and I'll try my best 😬

jaimergp avatar Sep 01 '23 16:09 jaimergp