From 10a53579c6a6b6770b744ac0e553dbc7d555971d Mon Sep 17 00:00:00 2001 From: Codeman maintainer Date: Fri, 6 Nov 2026 04:29:00 +0100 Subject: [PATCH] fix: Update-Codeman.sh no longer closes the settings pipe early (release review) The CODEMAN_APPDATA_PATH read ended awk at its first match. Whatever wrote the rest of `config --environment` then met a closed pipe, and pipefail ended the script with exit 141 and no message. Real Compose wins that race (0 of 50 runs, on 2.33.0 and 5.5.0), so nobody has reported it, but the test stub, once it honoured the shell environment, lost it. Same read as the password check below. Co-Authored-By: Claude Opus 5.5 --- docker/Update-Codeman.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker/Update-Codeman.sh b/docker/Update-Codeman.sh index 31a2fcda..a8043de9 100644 --- a/docker/Update-Codeman.sh +++ b/docker/Update-Codeman.sh @@ -166,10 +166,11 @@ fi # appdata directory (which creates it): this script updates an EXISTING # deployment, so a missing appdata path means there is nothing here yet to # update, and creating one would just be this script quietly doing -# Start-Codeman.sh's first-run job worse. +# Start-Codeman.sh's first-run job worse. No early `exit` in awk: a closed pipe +# would end this script through pipefail, with no message. appdata_path=$( "${compose_command[@]}" config --environment | - awk -F= '$1 == "CODEMAN_APPDATA_PATH" { sub(/^[^=]*=/, ""); print; exit }' + awk -F= '$1 == "CODEMAN_APPDATA_PATH" && !found { sub(/^[^=]*=/, ""); print; found = 1 }' ) if [[ -z "$appdata_path" || ! -d "$appdata_path" ]]; then printf 'Error: CODEMAN_APPDATA_PATH is not set or does not exist: %s\n' "${appdata_path:-}" >&2