I am running a Windows 2022 Standard server with IIS10 for my websites. I have UptimeKuma running without issue and I'm trying to get a script working that automatically updates it every week.
Here is my batch file:
rem echo off
echo.
cd /d D:\WebHosting\uptime-kuma
net stop UptimeKuma
echo Update from git
git fetch --all
echo Get latest tag name
set latesttag=
for /f "delims=" %%a in ('git describe --tags') do @set latesttag=%%a
echo Checking Out %latestTag%
git checkout %latestTag% --force
echo Install dependencies and prebuilt
npm install --omit=dev
echo Downloading distro
npm run download-dist
echo Restarting UptimeKuma
net start UptimeKuma
After the npm install --omit=dev
runs, the batch file drops out and doesn't finish the rest of the steps.
Here is the output:
The UptimeKuma service is not started.
D:\WebHosting\uptime-kuma>echo Update from git
Update from git
D:\WebHosting\uptime-kuma>git fetch --all
D:\WebHosting\uptime-kuma>echo Get latest tag name
Get latest tag name
D:\WebHosting\uptime-kuma>set latesttag=
D:\WebHosting\uptime-kuma>for /F "delims=" %a in ('git describe --tags') do @set latesttag=%a
D:\WebHosting\uptime-kuma>echo Checking Out 1.19.6
Checking Out 1.19.6
D:\WebHosting\uptime-kuma>git checkout 1.19.6 --force
HEAD is now at 2b57b3e8 Update to 1.19.6
D:\WebHosting\uptime-kuma>echo Install dependencies and prebuilt
Install dependencies and prebuilt
D:\WebHosting\uptime-kuma>npm install --omit=dev
up to date, audited 522 packages in 2s
68 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
This is the end, nothing occurs after this.
I was following the update procedures from the UptimeKuma website to come up with the above steps.
Any ideas why it's dropping out at this point?
UPDATE
I tried the following and it did the same thing.
start /w /b npm install --omit=dev