X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fpacker-clear-credentials.sh;h=866edcf5ae12e24a1c83102bc7ddc8247fd2c25e;hb=4ada8fbad994cdcb78c547742f4fe97456949193;hp=093b16b4f783eb69b988c5c354b97057db2fc61a;hpb=98f414a8e0c4a5977d05dd97b09399fcbeaae74d;p=releng%2Fglobal-jjb.git diff --git a/shell/packer-clear-credentials.sh b/shell/packer-clear-credentials.sh index 093b16b4..866edcf5 100644 --- a/shell/packer-clear-credentials.sh +++ b/shell/packer-clear-credentials.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -ue # SPDX-License-Identifier: EPL-1.0 ############################################################################## # Copyright (c) 2017 The Linux Foundation and others. @@ -10,6 +10,6 @@ ############################################################################## echo "---> packer-clear-credentials.sh" -set +e # DO NOT cause build failure if any of the rm calls fail. -rm "$CLOUDENV" -exit 0 +# OK if $CLOUDENV does not exist or empty +# Fails if $CLOUDENV exists and rm is unable to delete it +rm -rf "$CLOUDENV"