Fix docker-setup.sh crash with optional env vars under set -u

This commit is contained in:
Petra Donka authored and Peter Steinberger committed 2026-01-12 00:36:51 +00:00
1 parent 9c8967ef5d
commit 3c81ac0315
1 file changed
+2 -2
+2 -2
View File
@@ -132,7 +132,7 @@ upsert_env() {
local replaced=false
for k in "${keys[@]}"; do
if [[ "$key" == "$k" ]]; then
printf '%s=%s\n' "$k" "${!k}" >>"$tmp"
printf '%s=%s\n' "$k" "${!k-}" >>"$tmp"
seen["$k"]=1
replaced=true
break
@@ -146,7 +146,7 @@ upsert_env() {
for k in "${keys[@]}"; do
if [[ -z "${seen[$k]:-}" ]]; then
printf '%s=%s\n' "$k" "${!k}" >>"$tmp"
printf '%s=%s\n' "$k" "${!k-}" >>"$tmp"
fi
done