Merge pull request #2927 from SillyTavern/no-zip-updates Exit scripts when try to update non-git installs

697f02e7f35bdd8b83cd8555012c0d97a139bd61

Cohee <18619528+Cohee1207@users.noreply.github.com>

Signed
2 files changed, +22 -6Ignore whitespace
UpdateAndStart.bat+12 -3
@@ -2,17 +2,26 @@
22pushd %~dp0
33git --version > nul 2>&1
44if %errorlevel% neq 0 (
55 echo GitGit is not installed on this system. Skipping update.
6- echo If you installed with a zip file, you will need to download the new zip and install it manually.
6+ echo Install it from https://git-scm.com/downloads
7+ goto end
78) else (
9+ if not exist .git (
10+ echo Not running from a Git repository. Reinstall using an officially supported method to get updates.
11+ echo See: https://docs.sillytavern.app/installation/windows/
12+ goto end
13+ )
814 call git pull --rebase --autostash
915 if %errorlevel% neq 0 (
1016 REM incase there is still something wrong
1117 echo ThereThere were errors while updating. Please download the latest version manually.
18+ echo See the update FAQ at https://docs.sillytavern.app/usage/update/#common-update-problems
19+ goto end
1220 )
1321)
1422set NODE_ENV=production
1523call npm install --no-audit --no-fund --loglevel=error --no-progress --omit=dev
1624node server.js %*
25+:end
1726pause
1827popd
UpdateForkAndStart.bat+10 -3
@@ -5,8 +5,14 @@ pushd %~dp0
55echo Checking Git installation
66git --version > nul 2>&1
77if %errorlevel% neq 0 (
88 echo GitGit is not installed on this system. Skipping update.
9- echo If you installed with a zip file, you will need to download the new zip and install it manually.
9+ echo Install it from https://git-scm.com/downloads
10+ goto end
11+)
12+
13+if not exist .git (
14+ echo Not running from a Git repository. Reinstall using an officially supported method to get updates.
15+ echo See: https://docs.sillytavern.app/installation/windows/
1016 goto end
1117)
1218
@@ -89,7 +95,8 @@ git pull --rebase --autostash origin %TARGET_BRANCH%
8995
9096:install
9197if %errorlevel% neq 0 (
9298 echo ThereThere were errors while updating. Please check manually.
99+ echo See the update FAQ at https://docs.sillytavern.app/usage/update/#common-update-problems
93100 goto end
94101)
95102