From b295b5a5b6380246627dd52d5aa8d4617641fb68 Mon Sep 17 00:00:00 2001 From: inference-bot Date: Thu, 12 Nov 2026 03:30:11 +0000 Subject: [PATCH] publishing: fix check_toolchain dying silently on a missing package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pip show exits non-zero for an absent package; under set -euo pipefail the command substitution aborted build.sh before the self-heal could run — the gate then failed the deploy with no message at all. Tolerate the missing package (that is the case being healed) and report it. --- publishing/build.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/publishing/build.sh b/publishing/build.sh index b30dec0..2e33be6 100755 --- a/publishing/build.sh +++ b/publishing/build.sh @@ -53,7 +53,10 @@ check_toolchain() { case "$req" in ''|\#*) continue ;; esac pkg="${req%%[=<>!~]*}" case "$req" in *==*) want="${req#*==}" ;; *) want="" ;; esac - have="$("$VENV/bin/pip" show "$pkg" 2>/dev/null | sed -n 's/^Version: //p')" + # NB: the substitution must not fail the script under `set -euo pipefail` + # when the package is absent — a missing package is exactly the case this + # gate exists to heal, not an error to die on. + have="$({ "$VENV/bin/pip" show "$pkg" 2>/dev/null || true; } | sed -n 's/^Version: //p')" if [ -z "$have" ] || { [ -n "$want" ] && [ "$have" != "$want" ]; }; then missing="$missing ${pkg}(${want:-any}; have: ${have:-none})" fi