X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fpacker-clear-credentials.sh;h=866edcf5ae12e24a1c83102bc7ddc8247fd2c25e;hb=4ada8fbad994cdcb78c547742f4fe97456949193;hp=099f559151712b3e5f9bb8a1acedbc74fbbb19f8;hpb=10821edc619b09e4623884b02900c39431f8a809;p=releng%2Fglobal-jjb.git diff --git a/shell/packer-clear-credentials.sh b/shell/packer-clear-credentials.sh index 099f5591..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,8 +10,6 @@ ############################################################################## echo "---> packer-clear-credentials.sh" -#!/bin/bash -set +e # DO NOT cause build failure if any of the rm calls fail. -rm "$CLOUDENV" -rm "$HOME/.config/openstack/clouds.yaml" -exit 0 +# OK if $CLOUDENV does not exist or empty +# Fails if $CLOUDENV exists and rm is unable to delete it +rm -rf "$CLOUDENV"