mamba-org / mamba

The Fast Cross-Platform Package Manager
https://mamba.readthedocs.io
BSD 3-Clause "New" or "Revised" License
6.53k stars 342 forks source link

-r is ignored when .condarc has envs_dirs #3299

Open henk717 opened 1 month ago

henk717 commented 1 month ago

Troubleshooting docs

Anaconda default channels

How did you install Mamba?

Micromamba

Search tried in issue tracker

--no-rc / -r ignored

Latest version of Mamba

Tried in Conda?

Not applicable

Describe your issue

When I specify the root-prefix with -r this is ignored when there is a .condarc that has envs_dirs: specified, instead the root directory is brought to the location specified in the envs_dirs breaking my micromamba based script. I expect -r to be an override.

Using --no-rc this problem is bypassed, but because micromamba run lacks this option I can't succesfully run the env.

mamba info / micromamba info

libmamba version : 1.5.8
     micromamba version : 1.5.8
           curl version : libcurl/8.6.0 OpenSSL/3.2.1 zlib/1.2.13 zstd/1.5.5 libssh2/1.11.0 nghttp2/1.58.0
     libarchive version : libarchive 3.7.2 zlib/1.2.13 bz2lib/1.0.8 libzstd/1.5.5
       envs directories : /workspace
          package cache : /workspace/conda_pkgs
            environment : codecanvas (active)
           env location : /workspace/codecanvas
      user config files : /workspace/.mambarc
 populated config files : /workspace/.condarc
       virtual packages : __unix=0=0
                          __linux=5.4.0=0
                          __glibc=2.31=0
                          __archspec=1=x86_64-v3
                          __cuda=12.2=0
               channels : https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
       base environment : /workspace/micromamba
               platform : linux-64

Logs

No response

environment.yml

No response

~/.condarc

channels:
  - conda-forge
envs_dirs:
  - /workspace
pkgs_dirs:
  - /workspace/conda_pkgs