diff --git a/data/data/bootstrap/files/usr/local/bin/release-image.sh.template b/data/data/bootstrap/files/usr/local/bin/release-image.sh.template index f652b43ca8..0dd068c646 100755 --- a/data/data/bootstrap/files/usr/local/bin/release-image.sh.template +++ b/data/data/bootstrap/files/usr/local/bin/release-image.sh.template @@ -4,7 +4,7 @@ # Convert the release image pull spec to an "absolute" form if a digest is available # Multi Release Payloads have 2 RepoDigests, we need the one that matches the Digest. -if ! RELEASE_IMAGE_DIGEST=$( podman inspect {{.ReleaseImage}} --format json | jq -r '.[].Digest as $digest | .[].RepoDigests[] | select(contains($digest))' ) || [[ -z "${RELEASE_IMAGE_DIGEST}" ]]; then +if ! RELEASE_IMAGE_DIGEST=$( podman inspect {{.ReleaseImage}} --format json | jq -r 'first(.[].Digest as $digest | .[].RepoDigests[] | select(contains($digest)))' ) || [[ -z "${RELEASE_IMAGE_DIGEST}" ]]; then echo "Warning: Could not resolve release image to pull by digest" 2>&1 RELEASE_IMAGE_DIGEST="{{.ReleaseImage}}" fi