mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-21 18:53:37 +00:00
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.
This commit is contained in:
+3
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user