fix(update.sh): stop config sync loop from dying silently on a missing key #53

Merged
haylan merged 2 commits from feat-rag-databases into main 2026-09-07 18:10:23 +00:00
Showing only changes of commit 1fcf30e9a1 - Show all commits
+4 -2
View File
@@ -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")