Merge pull request 'fix(update.sh): stop config sync loop from dying silently on a missing key' (#53) from feat-rag-databases into main

Reviewed-on: #53
This commit was merged in pull request #53.
This commit is contained in:
2026-09-07 18:10:23 +00:00
+4 -2
View File
@@ -93,10 +93,12 @@ conflict_old=()
conflict_new=() conflict_new=()
while IFS='=' read -r key value; do while IFS='=' read -r key value; do
[ -n "$value" ] || continue [ -n "$value" ] || continue
current="$(grep -E "^${key}=" .env | head -1 | cut -d= -f2-)"
if ! grep -qE "^${key}=" .env; then if ! grep -qE "^${key}=" .env; then
echo "${key}=${value}" >> .env 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_keys+=("$key")
conflict_old+=("$current") conflict_old+=("$current")
conflict_new+=("$value") conflict_new+=("$value")