From 0e1fed86ba4bcbeace98000756e1ba141e68b9b1 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Thu, 27 Oct 2022 16:06:16 +0530 Subject: [PATCH] Download micromamba again if it failed to download the first time --- scripts/bootstrap.bat | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/bootstrap.bat b/scripts/bootstrap.bat index afe4564e..ca57bc36 100644 --- a/scripts/bootstrap.bat +++ b/scripts/bootstrap.bat @@ -27,7 +27,12 @@ if "%ERRORLEVEL%" NEQ "0" set PACKAGES_TO_INSTALL=%PACKAGES_TO_INSTALL% git @rem (if necessary) install git and conda into a contained environment if "%PACKAGES_TO_INSTALL%" NEQ "" ( @rem download micromamba - if not exist "%MAMBA_ROOT_PREFIX%\micromamba.exe" ( + set download_umamba=T + + call "%MAMBA_ROOT_PREFIX%\micromamba.exe" --version >.tmp1 2>.tmp2 + if "%ERRORLEVEL%" EQU "0" set download_umamba=F + + if "%download_umamba%" == "T" ( echo "Downloading micromamba from %MICROMAMBA_DOWNLOAD_URL% to %MAMBA_ROOT_PREFIX%\micromamba.exe" mkdir "%MAMBA_ROOT_PREFIX%"