From d0dae51e344282976ad7e4596cbcde448f3fe1aa Mon Sep 17 00:00:00 2001 From: Pulse Monitor Date: Thu, 28 Aug 2025 08:10:25 +0000 Subject: [PATCH] fix: detect fresh installs correctly for auto-update prompts The script was checking if CONFIG_DIR existed to detect fresh installs, but we create that directory early in the process. Now checking for system.json file instead which only exists after a real installation. --- install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index bf1d865a1..2129767fd 100755 --- a/install.sh +++ b/install.sh @@ -1369,8 +1369,9 @@ main() { esac else # Check if this is truly a fresh installation or an update - # If binary exists OR config exists OR --version was specified, it's likely an update - if [[ -f "$INSTALL_DIR/bin/pulse" ]] || [[ -f "$INSTALL_DIR/pulse" ]] || [[ -d "$CONFIG_DIR" ]] || [[ -n "${FORCE_VERSION}" ]]; then + # Check for existing installation BEFORE we create directories + # If binary exists OR system.json exists OR --version was specified, it's likely an update + if [[ -f "$INSTALL_DIR/bin/pulse" ]] || [[ -f "$INSTALL_DIR/pulse" ]] || [[ -f "$CONFIG_DIR/system.json" ]] || [[ -n "${FORCE_VERSION}" ]]; then # This is an update/reinstall, don't prompt for port FRONTEND_PORT=${FRONTEND_PORT:-7655} else