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:-?})"