From 1fcf30e9a181e2900b406824e22876af7009ec7c Mon Sep 17 00:00:00 2001 From: ArthurErlich Date: Mon, 7 Sep 2026 20:09:31 +0200 Subject: [PATCH] fix(update.sh): stop config sync loop from dying silently on a missing key current=$(grep ...) ran before checking whether the key existed in .env at all. Under set -euo pipefail, a key missing from .env (e.g. a new tunable this branch just added to .env.example) made that grep exit 1, pipefail propagated it, and set -e killed the script instantly with no output - looked exactly like a gum hang but never reached ensure_gum. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01Bs8xf8Dt8X6tRBvBiLCXYc --- scripts/update.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/update.sh b/scripts/update.sh index 4c14f1d..e1a6bae 100755 --- a/scripts/update.sh +++ b/scripts/update.sh @@ -93,10 +93,12 @@ conflict_old=() conflict_new=() while IFS='=' read -r key value; do [ -n "$value" ] || continue - current="$(grep -E "^${key}=" .env | head -1 | cut -d= -f2-)" if ! grep -qE "^${key}=" .env; then echo "${key}=${value}" >> .env - elif [ "$current" != "$value" ]; then + continue + fi + current="$(grep -E "^${key}=" .env | head -1 | cut -d= -f2-)" + if [ "$current" != "$value" ]; then conflict_keys+=("$key") conflict_old+=("$current") conflict_new+=("$value") -- 2.54.0