From abd8c6939503e252d6f7fc0ac73e78cfe2677493 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Sat, 12 Nov 2022 13:07:29 +0530 Subject: [PATCH] =?UTF-8?q?Bypass=20a=20bug=20in=20micromamba,=20where=20i?= =?UTF-8?q?t=20fails=20silently=20if=20the=20APPDATA=20env=20variable=20ha?= =?UTF-8?q?s=20special=20characters=20like=20=C3=B6=C3=A4=C3=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/bootstrap.bat | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/bootstrap.bat b/scripts/bootstrap.bat index 2a6d1804..9dcac333 100644 --- a/scripts/bootstrap.bat +++ b/scripts/bootstrap.bat @@ -12,6 +12,8 @@ set INSTALL_ENV_DIR=%cd%\installer_files\env set LEGACY_INSTALL_ENV_DIR=%cd%\installer set MICROMAMBA_DOWNLOAD_URL=https://github.com/cmdr2/stable-diffusion-ui/releases/download/v1.1/micromamba.exe set umamba_exists=F +set OLD_APPDATA=%APPDATA% +set APPDATA=%cd%\installer_files\appdata @rem figure out whether git and conda needs to be installed if exist "%INSTALL_ENV_DIR%" set PATH=%INSTALL_ENV_DIR%;%INSTALL_ENV_DIR%\Library\bin;%INSTALL_ENV_DIR%\Scripts;%INSTALL_ENV_DIR%\Library\usr\bin;%PATH% @@ -43,6 +45,8 @@ if "%PACKAGES_TO_INSTALL%" NEQ "" ( exit /b ) + mkdir "%APPDATA%" + @rem test the mamba binary echo Micromamba version: call "%MAMBA_ROOT_PREFIX%\micromamba.exe" --version @@ -63,3 +67,6 @@ if "%PACKAGES_TO_INSTALL%" NEQ "" ( exit /b ) ) + +@rem revert to the old APPDATA. only needed it for bypassing a bug in micromamba (with special characters) +set APPDATA=%OLD_APPDATA%