From 24fe444eb6256e92e62802d4b5094970e12b7ffd Mon Sep 17 00:00:00 2001 From: Gabriela Cervantes Date: Wed, 2 Oct 2024 18:53:12 +0000 Subject: [PATCH] script/setup/install-runc: Add trap statement to clean up tmp files This PR adds the trap statement in the install runc script to clean up the temporary files and ensure we are not leaving them. Signed-off-by: Gabriela Cervantes --- script/setup/install-runc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/setup/install-runc b/script/setup/install-runc index 67743d750b7f..e55f671f58be 100755 --- a/script/setup/install-runc +++ b/script/setup/install-runc @@ -34,13 +34,13 @@ function install_runc() { : "${RUNC_REPO:=https://github.com/opencontainers/runc.git}" TMPROOT=$(mktemp -d) + trap "rm -fR ${TMPROOT}" EXIT git clone "${RUNC_REPO}" "${TMPROOT}"/runc pushd "${TMPROOT}"/runc git checkout "${RUNC_VERSION}" env -u VERSION make BUILDTAGS='seccomp' runc $SUDO make install popd - rm -fR "${TMPROOT}" } function install_crun() {