From 8b0d034f45296fe737d571885ae33e52df97b215 Mon Sep 17 00:00:00 2001 From: fiftydinar <65243233+fiftydinar@users.noreply.github.com> Date: Sat, 7 Dec 2024 22:24:09 +0100 Subject: [PATCH] fix(signing): Error-out on missing image cosign key --- modules/signing/signing.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/signing/signing.sh b/modules/signing/signing.sh index c68ae55..5d0c1bd 100644 --- a/modules/signing/signing.sh +++ b/modules/signing/signing.sh @@ -23,7 +23,9 @@ if ! [ -d "/etc/pki/containers" ]; then fi if ! [ -f "/etc/pki/containers/${IMAGE_NAME_FILE}.pub" ]; then - cp "/usr/share/ublue-os/cosign.pub" "/etc/pki/containers/${IMAGE_NAME_FILE}.pub" + echo "ERROR: Cannot find '.pub' image key in '/etc/pki/containers/'" + echo " BlueBuild CLI should have copied it, but it didn't" + exit 1 fi TEMPLATE_POLICY="${MODULE_DIRECTORY}/signing/policy.json"