fix: ensure RC version variable is properly initialized

Initialize RC_VERSION to empty string before assignment to prevent
'unbound variable' errors when running with set -u. This ensures
the RC update option is shown when running a stable version.
This commit is contained in:
Pulse Monitor
2025-08-24 16:16:48 +00:00
parent 1ad1315e01
commit a5c8021cb1
+2 -1
View File
@@ -908,7 +908,8 @@ main() {
fi
# For RC, we need the API, so if it fails just use empty
local RC_VERSION=$(curl -s https://api.github.com/repos/$GITHUB_REPO/releases | grep '"tag_name":' | head -1 | sed -E 's/.*"([^"]+)".*/\1/' 2>/dev/null || true)
local RC_VERSION=""
RC_VERSION=$(curl -s https://api.github.com/repos/$GITHUB_REPO/releases 2>/dev/null | grep '"tag_name":' | head -1 | sed -E 's/.*"([^"]+)".*/\1/' || true)
# Determine default update channel
UPDATE_CHANNEL="stable"