mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-20 09:23:27 +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:
parent
f407137d62
commit
d0dae51e34
1 changed files with 3 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue