chore: abort update and start scripts when .git folder is missing
All checks were successful
Build / build (pull_request) Successful in 59s

In that case, updating is obviously not possible.
This commit is contained in:
Sainan 2025-08-27 00:26:13 +02:00
parent 9d034824f7
commit 325f402536
2 changed files with 37 additions and 33 deletions

View File

@ -2,6 +2,7 @@
echo Updating SpaceNinjaServer...
git fetch --prune
if %errorlevel% == 0 (
git stash
git checkout -f origin/main
@ -20,6 +21,8 @@ if %errorlevel% == 0 (
call npm run start
echo SpaceNinjaServer seems to have crashed.
)
)
:a
pause > nul
goto a

View File

@ -2,6 +2,7 @@
echo "Updating SpaceNinjaServer..."
git fetch --prune
if [ $? -eq 0 ]; then
git stash
git checkout -f origin/main
@ -20,4 +21,4 @@ if [ $? -eq 0 ]; then
npm run start
echo "SpaceNinjaServer seems to have crashed."
fi
fi