From e252c9ac05d7551cd08e8e85b086097960e91702 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Mon, 14 Nov 2022 10:11:28 +0530 Subject: [PATCH] Only set the userprofile if in a new micromamba installation --- scripts/bootstrap.bat | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/bootstrap.bat b/scripts/bootstrap.bat index c506d52d..7d067cc3 100644 --- a/scripts/bootstrap.bat +++ b/scripts/bootstrap.bat @@ -12,10 +12,10 @@ 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 -@mkdir %cd%\profile +set OLD_APPDATA=%APPDATA% +set OLD_USERPROFILE=%USERPROFILE% +set APPDATA=%cd%\installer_files\appdata set USERPROFILE=%cd%\profile @rem figure out whether git and conda needs to be installed @@ -49,6 +49,7 @@ if "%PACKAGES_TO_INSTALL%" NEQ "" ( @REM ) mkdir "%APPDATA%" + mkdir "%USERPROFILE%" @rem test the mamba binary echo Micromamba version: @@ -73,3 +74,4 @@ if "%PACKAGES_TO_INSTALL%" NEQ "" ( @rem revert to the old APPDATA. only needed it for bypassing a bug in micromamba (with special characters) set APPDATA=%OLD_APPDATA% +set USERPROFILE=%OLD_USERPROFILE%