From 2964a71ea7dadb62b80e3ef355ef71f34aecea4a Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Wed, 18 Feb 2026 21:38:57 +0000 Subject: [PATCH] Fix generate-configs.sh: use set_key/get_key for resolved keys The bash 3.2 compatibility fix (841b376) added set_key/get_key helpers but didn't update the 6 call sites that still used RESOLVED_*[$key] associative array syntax. Without declare -A, bash treats string subscripts as arithmetic (evaluating to 0), so all nodes silently got the last node's identity. Switch all references to the existing helpers. --- .../docker-network/scripts/generate-configs.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/examples/docker-network/scripts/generate-configs.sh b/examples/docker-network/scripts/generate-configs.sh index 2fe5985..619910e 100755 --- a/examples/docker-network/scripts/generate-configs.sh +++ b/examples/docker-network/scripts/generate-configs.sh @@ -81,7 +81,7 @@ generate_peer_block() { local topology_file="$1" local peer_id="$2" - local peer_npub="${RESOLVED_NPUB[$peer_id]}" + local peer_npub="$(get_key RESOLVED_NPUB "$peer_id")" local peer_ip=$(get_node_attr "$topology_file" "$peer_id" "address") cat <> "$env_file" + echo "${var_name}=$(get_key RESOLVED_NPUB "$node_id")" >> "$env_file" done echo " ✓ Generated $env_file" }