mamba-org / vscode-micromamba

A VSCode extension to generate development environments using micromamba and conda-forge package repository
BSD 3-Clause "New" or "Revised" License
82 stars 10 forks source link

Please add support for MAMBA_ROOT_PREFIX #7

Closed vx-i closed 2 years ago

vx-i commented 2 years ago

Environment

  1. node -v: --
  2. npm -v: --
  3. Operating system: Windows 10 Pro

Prerequisite

--

Steps to Reproduce

Micromamba: activate environment

Expected Behavior

"Micromamba: activate environment" should check if MAMBA_ROOT_PREFIX is set and use it

Actual Behavior

"Micromamba: create environment" needs to be used


Hi corker, I saw in #3 that you plan to work on this feature. Do you have a rough schedule of when you will have time for it? Unfortunately, I am not familiar with TypeScript, so I cannot help out with a pull request.

corker commented 2 years ago

That shouldn't be a big deal to implement it. I'm going to take a look in February 2022

corker commented 2 years ago

I found the problem. Global and local micromamba environment variables were mixed. When micromamba is already in the path the extension didn't download the local version but tried to use the global. At the same time MAMBA_ROOT_PREFIX and MAMBA_EXE were set to the local path and confused the global micromamba. I change the logic download the local micromamba when it isn't downloaded yet. This way extension never relies on the global micromamba.