From 872ebb94dd5f0ff404bea67a5b07be041ff3669c Mon Sep 17 00:00:00 2001 From: Richard Zink Date: Tue, 10 Nov 2026 08:44:51 +0100 Subject: [PATCH] deploy.sh: image check no longer fails at random (grep -q + pipefail) Co-Authored-By: Claude Opus 5.5 --- scripts/deploy.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 20a79c0..8d7c58a 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -73,7 +73,9 @@ case "$(remote 'uname -m')" in x86_64) arch=amd64 ;; aarch64|arm64) arch=arm64 ;; *) arch="" ;; esac if [[ -n "$arch" ]]; then - docker buildx imagetools inspect "$REGISTRY:$tag" 2>/dev/null | grep -q "Platform:.*linux/$arch" \ + # Captured first: `inspect | grep -q` fails under pipefail when grep exits early (SIGPIPE). + manifests=$(docker buildx imagetools inspect "$REGISTRY:$tag" 2>/dev/null || true) + grep -q "Platform:.*linux/$arch" <<<"$manifests" \ || fail "$REGISTRY:$tag has no linux/$arch image – run scripts/release.sh first" fi echo "deploying $tag (running: ${current:-unknown}, target linux/${arch:-?})"