mamba-org / mamba

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

Access denied when using `self-update` #2705

Open jonashaag opened 1 year ago

jonashaag commented 1 year ago

I'm using Cygwin on Windows 10

micromamba --version # 1.4.9
# Downgrade to 1.4.5
micromamba self-update --version '1.4.5'
critical libmamba rename: Access is denied.: "C:\Users\USER\.bin\m.exe", "C:\Users\USER\.bin\m.exe.bkup"
jonashaag commented 1 year ago

I removed m.exe.bkup, then it worked but I got

The following arguments were not expected: C:\Users\USER\micromamba -p
Run with --help for more information.
jonashaag commented 1 year ago

Similar issue on Linux

error    libmamba Could not lock non-existing path '/home/USER/micromamba/conda-meta'

Transaction starting
Download only - packages are downloaded and extracted. Skipping the linking phase.
The following arguments were not expected: /home/USER/micromamba -p
wolfv commented 1 year ago

Hmm – the first issue looks like a Windows issue about not making it easy to replace a file that is in use. I need to check, but I think we wrote some additional wrapper stuff in the cmd.exe hooks to take care of that, and I didn't think of the "bash / cygwin" use case ...

Regarding the issue on Linux I am wondering if it has to do with some of the shell command modifications that were recently done (cc @AntoinePrv)

AntoinePrv commented 1 year ago

2787 should do for the extra argument. I think this currently working as intended, reinit seems to be a guard againt possible change in the initialization script.

It the Windows still an issue?