From 6c8a67db3d28e8edee2b0980615e849e1574c55e Mon Sep 17 00:00:00 2001 From: Myasnikov Daniil Date: Mon, 25 May 2026 12:58:08 +0500 Subject: [PATCH] fix(talos): fail fast on skopeo copy errors in image-talos MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The image-talos recipe chains skopeo copy with `;` in a single shell. Without `set -e`, the recipe's exit status is the last command's, so a failed copy in the middle of the chain can be masked by a later successful command — or worse, by a false-branch `if`/`fi` (which exits 0 and would silently hide a push failure on PR builds where both PUBLISH_* flags are 0). Prepend `set -e;` to abort the recipe on the first failure. Also quote "$SRC" defensively. Assisted-By: Claude Signed-off-by: Myasnikov Daniil --- packages/core/talos/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/core/talos/Makefile b/packages/core/talos/Makefile index 746f63c2d..d9a65cd4a 100644 --- a/packages/core/talos/Makefile +++ b/packages/core/talos/Makefile @@ -12,10 +12,11 @@ image: image-matchbox image-talos image-talos: test -f ../../../_out/assets/installer-amd64.tar || make talos-installer + set -e; \ SRC=docker-archive:../../../_out/assets/installer-amd64.tar; \ - skopeo copy $$SRC docker://$(REGISTRY)/talos:$(IMAGE_TAG); \ - if [ "$(PUBLISH_VERSIONED)" = "1" ]; then skopeo copy $$SRC docker://$(REGISTRY)/talos:$(TALOS_VERSION); fi; \ - if [ "$(PUBLISH_FLOATING)" = "1" ]; then skopeo copy $$SRC docker://$(REGISTRY)/talos:latest; fi + skopeo copy "$$SRC" docker://$(REGISTRY)/talos:$(IMAGE_TAG); \ + if [ "$(PUBLISH_VERSIONED)" = "1" ]; then skopeo copy "$$SRC" docker://$(REGISTRY)/talos:$(TALOS_VERSION); fi; \ + if [ "$(PUBLISH_FLOATING)" = "1" ]; then skopeo copy "$$SRC" docker://$(REGISTRY)/talos:latest; fi image-matchbox: test -f ../../../_out/assets/kernel-amd64 || make talos-kernel