From d03659d844ccbcb3713007748dd74eedfdca20d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leif=20Roger=20Fr=C3=B8ysaa?= Date: Wed, 23 Sep 2026 13:50:14 +0200 Subject: [PATCH] fix(build): propagate errors out of the libgit2 cross-build loop The aarch64/x86_64 cross-build for-loop had no 'set -e', so a cmake/make failure for one arch was silently swallowed and the loop moved on to the next, leaving that arch's libgit2 missing from /usr/local/deps while the RUN step still exited 0. Verified both aarch64 and x86_64 libgit2 still build successfully after this change (native arm64 build of the 'builder' stage). --- backend/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index d0023958451..19ab59a2b60 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -61,7 +61,10 @@ COPY --from=debian-arm64 /usr/lib/aarch64-linux-gnu /rootfs-arm64/usr/lib/aarch6 COPY --from=debian-arm64 /lib/aarch64-linux-gnu /rootfs-arm64/lib/aarch64-linux-gnu -RUN for arch in aarch64 x86_64 ; do \ +# set -e: otherwise a build failure for one arch is silently skipped and the +# other arch's libgit2 is never installed under /usr/local/deps. +RUN set -e; \ + for arch in aarch64 x86_64 ; do \ mkdir -p /tmp/build/${arch} && cd /tmp/build/${arch} && \ wget https://github.com/libgit2/libgit2/archive/refs/tags/v1.5.0.tar.gz -O - | tar -xz && \ cd libgit2-1.5.0 && \