From cb1dd4ca214057578e18fac9f77b6037807a7255 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Wed, 9 Oct 2019 14:01:22 -0400 Subject: [PATCH] BuildSourceImage: catch return code and exit Signed-off-by: Vincent Batts --- BuildSourceImage.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/BuildSourceImage.sh b/BuildSourceImage.sh index 6034768..d0db1ca 100755 --- a/BuildSourceImage.sh +++ b/BuildSourceImage.sh @@ -1120,6 +1120,10 @@ main() { # including its digest. if [ -z "${inspect_image_digest}" ] ; then inspect_image_digest="$(fetch_img_digest "$(parse_img_base "${input_inspect_image_ref}"):$(parse_img_tag "${input_inspect_image_ref}")")" + ret=$? + if [ ${ret} -ne 0 ] ; then + _error "failed to detect image digest" + fi fi _debug "inspect_image_digest: ${inspect_image_digest}"