SillyTavern / SillyTavern-Launcher

Launcher scripts for SillyTavern and ST-Extras.
MIT License
215 stars 58 forks source link

[BUG] installer removes items from path #42

Open felorhik opened 7 months ago

felorhik commented 7 months ago

Environment

🪟 Windows

System

Windows 11

Describe the problem

I noticed that trying to use the installer, it kept trying to download winget and add it to path, winget was already installed though.

After more digging, I found that it was removing the windows store record %userprofile%\AppData\Local\Microsoft\WindowsApps\ in the path everytime, making it so after it asked you to restart the installer it would just try to reinstall it.

Then the same happened with conda. Which I also manually readded. %userprofile%\miniconda3\condabin

I commented out lines 61-80 and 119-138 (the sections messing with the PATH for conda and winget) and that seemed to get me to the next step at least.

Additional info

No response

Please tick the boxes

bgiesing commented 7 months ago

Same here, no issue with Winget but I got into a never ending loop of "Miniconda already exists in PATH", it trying to install, and then saying to restart the installer

[INFO] winget already exists in PATH.
[INFO] Winget is already installed.
[INFO] Git is already installed.
[INFO] miniconda3 already exists in PATH.
[18:17:13.20] [WARN] Miniconda3 is not installed on this system.
[18:17:13.20] [INFO] Installing Miniconda3 using Winget...
Found an existing package already installed. Trying to upgrade the installed package...
No available upgrade found.
No newer package versions are available from the configured sources.
[18:17:13.20] [INFO] Miniconda3 installed successfully. Please restart the Installer.
Press any key to continue . . .

I simply deleted this entire section from the bat and it all worked fine

REM Check if Miniconda3 is installed if not then install Miniconda3
call conda --version > nul 2>&1
if %errorlevel% neq 0 (
    echo %yellow_bg%[%time%]%reset% %yellow_fg_strong%[WARN] Miniconda3 is not installed on this system.%reset%
    echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Installing Miniconda3 using Winget...
    winget install -e --id Anaconda.Miniconda3
    echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%Miniconda3 installed successfully. Please restart the Installer.%reset%
    pause
    exit
) else (
    echo %blue_fg_strong%[INFO] Miniconda3 is already installed.%reset%
)