From 0e0661eb68e2f565a2537f8aced641eb949c2c50 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Tue, 21 Oct 2025 09:41:46 +0000 Subject: [PATCH] fix: skip auto-update prompt for source builds Source builds use commit hashes (0.0.0-main-44ef8b6) not semantic versions (v4.23.0), so auto-updates don't make sense. The auto-updater would download release binaries, replacing the user's source build. Changes: - Skip auto-update question when BUILD_FROM_SOURCE=true - Show informational message instead - Applies to both Quick and Advanced modes This prevents confusion when users explicitly choose --source to get the latest main branch code instead of stable releases. --- install.sh | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/install.sh b/install.sh index 7e5790e..71e044d 100755 --- a/install.sh +++ b/install.sh @@ -424,15 +424,20 @@ create_lxc_container() { frontend_port=7655 fi - echo - # Ask about auto-updates - echo "Enable automatic updates?" - echo "Pulse can automatically install stable updates daily (between 2-6 AM)" - safe_read_with_default "Enable auto-updates? [y/N]: " enable_updates "n" auto_updates_flag="" - if [[ "$enable_updates" =~ ^[Yy]$ ]]; then - auto_updates_flag="--enable-auto-updates" - ENABLE_AUTO_UPDATES=true # Set the global variable for host installations + if [[ "$BUILD_FROM_SOURCE" == "true" ]]; then + echo + print_info "Skipping auto-update configuration: source builds don't support automatic release updates." + else + echo + # Ask about auto-updates + echo "Enable automatic updates?" + echo "Pulse can automatically install stable updates daily (between 2-6 AM)" + safe_read_with_default "Enable auto-updates? [y/N]: " enable_updates "n" + if [[ "$enable_updates" =~ ^[Yy]$ ]]; then + auto_updates_flag="--enable-auto-updates" + ENABLE_AUTO_UPDATES=true # Set the global variable for host installations + fi fi if [[ -z "$PROXY_MODE" ]]; then @@ -551,15 +556,20 @@ create_lxc_container() { print_info "Using default: 7655" frontend_port=7655 fi - # Quick mode should ask about auto-updates too - echo - echo "Enable automatic updates?" - echo "Pulse can automatically install stable updates daily (between 2-6 AM)" - safe_read_with_default "Enable auto-updates? [y/N]: " enable_updates "n" auto_updates_flag="" - if [[ "$enable_updates" =~ ^[Yy]$ ]]; then - auto_updates_flag="--enable-auto-updates" - ENABLE_AUTO_UPDATES=true # Set the global variable for host installations + if [[ "$BUILD_FROM_SOURCE" == "true" ]]; then + echo + print_info "Skipping auto-update configuration: source builds don't support automatic release updates." + else + # Quick mode should ask about auto-updates too + echo + echo "Enable automatic updates?" + echo "Pulse can automatically install stable updates daily (between 2-6 AM)" + safe_read_with_default "Enable auto-updates? [y/N]: " enable_updates "n" + if [[ "$enable_updates" =~ ^[Yy]$ ]]; then + auto_updates_flag="--enable-auto-updates" + ENABLE_AUTO_UPDATES=true # Set the global variable for host installations + fi fi if [[ -z "$PROXY_MODE" ]]; then