Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: delete conda dir and micromamba.exe if legacy version installed #318

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 20 additions & 2 deletions update-runtime.cmd
Original file line number Diff line number Diff line change
@@ -1,15 +1,33 @@
@echo off
cd /d "%~dp0"

SET MAMBA_ROOT_PREFIX=%~dp0conda
echo %MAMBA_ROOT_PREFIX%

if exist "%MAMBA_ROOT_PREFIX%\condabin\micromamba.bat" (
echo Deleting micromamba.exe as its out of date
del micromamba.exe
if errorlevel 1 (
echo Error: Failed to delete micromamba.exe. Please delete it manually.
exit /b 1
)
echo Deleting the conda directory as its out of date
rmdir /s /q conda
if errorlevel 1 (
echo Error: Failed to delete the conda directory. Please delete it manually.
exit /b 1
)
)

:Check if micromamba is already installed
if exist micromamba.exe goto Isolation
curl.exe -L -o micromamba.exe https://github.com/mamba-org/micromamba-releases/releases/latest/download/micromamba-win-64

cd /d "%~dp0"

:Isolation
SET CONDA_SHLVL=
SET PYTHONNOUSERSITE=1
SET PYTHONPATH=
SET MAMBA_ROOT_PREFIX=%~dp0conda
echo %MAMBA_ROOT_PREFIX%


Expand Down