From 1a5dbd946160710f299f49682efc09810a01a583 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Wed, 3 Dec 2025 09:04:45 +0000 Subject: [PATCH] fix: sensor-proxy installer fails silently on containers without snapshots The SNAPSHOT_START extraction used grep in a pipeline with pipefail enabled. When a container config has no snapshot sections (no lines starting with '['), grep returns exit code 1, causing set -e to terminate the script without any error message. This affected newly created containers that hadn't been snapshotted yet, which is the common case for fresh Pulse installations via community scripts. Related to #780 --- scripts/install-sensor-proxy.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/install-sensor-proxy.sh b/scripts/install-sensor-proxy.sh index 2850976..14557e3 100755 --- a/scripts/install-sensor-proxy.sh +++ b/scripts/install-sensor-proxy.sh @@ -3225,7 +3225,8 @@ if [[ "$STANDALONE" == false && "$CONTAINER_ON_THIS_NODE" == true ]]; then fi # Extract line number where snapshots start (first line starting with [) - SNAPSHOT_START=$(grep -n '^\[' "$TEMP_CONFIG" | head -1 | cut -d: -f1) + # Note: grep returns 1 if no match, which fails with pipefail - use || true to suppress + SNAPSHOT_START=$(grep -n '^\[' "$TEMP_CONFIG" | head -1 | cut -d: -f1 || true) if grep -Eq '^mp[0-9]+:.*pulse-sensor-proxy|^mp[0-9]+:.*mnt/pulse-proxy' "$TEMP_CONFIG" 2>/dev/null; then print_info "Removing mp mounts for pulse-sensor-proxy to keep snapshots and migrations working"