From 868db0fdc86d8909b2d20222ed05025aa86f7874 Mon Sep 17 00:00:00 2001 From: Pulse Monitor Date: Sat, 23 Aug 2025 23:06:30 +0000 Subject: [PATCH] fix: auto-update when --version flag is provided Skip the interactive menu and directly update when a specific version is requested via --version flag --- install.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/install.sh b/install.sh index 814749b88..d71c6b582 100755 --- a/install.sh +++ b/install.sh @@ -835,6 +835,19 @@ main() { # Check for existing installation FIRST before asking for configuration if check_existing_installation; then + # If a specific version was requested, just update to it + if [[ -n "${FORCE_VERSION}" ]]; then + print_info "Updating to version ${FORCE_VERSION}..." + LATEST_RELEASE="${FORCE_VERSION}" + backup_existing + systemctl stop $SERVICE_NAME || true + create_user + download_pulse + start_pulse + print_completion + return 0 + fi + # Get both stable and RC versions local STABLE_VERSION=$(curl -s https://api.github.com/repos/$GITHUB_REPO/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' 2>/dev/null) 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)