From 5be623d8a6eba5a818e298789f3bdba1a71c9a5a Mon Sep 17 00:00:00 2001 From: John Duimovich Date: Tue, 10 Dec 2024 17:07:29 -0500 Subject: [PATCH] ensure sbom dir is empty --- rhtap/download-sbom-from-url-in-attestation.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rhtap/download-sbom-from-url-in-attestation.sh b/rhtap/download-sbom-from-url-in-attestation.sh index b477360..f91ab70 100755 --- a/rhtap/download-sbom-from-url-in-attestation.sh +++ b/rhtap/download-sbom-from-url-in-attestation.sh @@ -295,7 +295,8 @@ find_blob_url() { end' < "$attestation_file" } -echo "Making sure $SBOMS_DIR directory exists" +echo "Making sure $SBOMS_DIR directory exists and is empty prior to downloading" +rm -rf "$SBOMS_DIR" mkdir -p "$SBOMS_DIR" jq -r '.components[].containerImage' <<< "$IMAGES" | while read -r image; do