From 8fa91986f082f3cfb8fd50fa4080ae3285218733 Mon Sep 17 00:00:00 2001 From: Jacob Hagstedt Date: Sat, 24 Oct 2026 12:20:54 +0200 Subject: [PATCH] build-images.sh: detect Podman without a pipe (pipefail + grep -q) Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01TQd3pEP9UeN2uifbHknQ7B --- infra/build-images.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/infra/build-images.sh b/infra/build-images.sh index 07f820a..f6de6e7 100755 --- a/infra/build-images.sh +++ b/infra/build-images.sh @@ -45,7 +45,9 @@ images=( "kvitt-backup|infra/backup|infra/backup/Dockerfile" ) -if docker version 2>/dev/null | grep -qi podman; then engine=podman; else engine=docker; fi +# Capture first: `grep -q` in a pipe closes it early, `docker version` dies of SIGPIPE and pipefail makes the test fail. +engine_info="$(docker version 2>/dev/null || true)" +if [[ "$engine_info" == *[Pp]odman* ]]; then engine=podman; else engine=docker; fi echo "Engine: $engine; registry: $registry; tag: $tag (and latest); push: $([[ $push == 1 ]] && echo yes || echo no)" if [[ $push == 1 && -n "$user" && -n "$token" ]]; then