From e36d1cfa8e6d4191eef6721a13cb33638b9826df Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Mon, 7 Feb 2022 09:16:49 -0500 Subject: [PATCH] hack/e2e: cleanup tmp dir This directory can be cleaned up at the end of the exection. --- hack/e2e.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hack/e2e.sh b/hack/e2e.sh index 1a280b1284..5723826c98 100755 --- a/hack/e2e.sh +++ b/hack/e2e.sh @@ -5,6 +5,10 @@ set -euo pipefail unset GOFLAGS tmp="$(mktemp -d)" -git clone "https://github.com/openshift/cluster-api-actuator-pkg.git" "$tmp" +cleanup() { + rm -rf "${tmp}" +} +trap cleanup EXIT +git clone "https://github.com/openshift/cluster-api-actuator-pkg.git" "$tmp" exec make -C "$tmp" test-e2e