From e9b6b30c02b954ef7866bcfc617f77747d004ae4 Mon Sep 17 00:00:00 2001 From: elAgala Date: Fri, 13 Feb 2026 05:29:13 -0300 Subject: [PATCH] fix: always remove cloned repo after run --- index.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/index.sh b/index.sh index 0c502a6..c4c26b0 100644 --- a/index.sh +++ b/index.sh @@ -9,6 +9,8 @@ if [ -z "$ADMIN_USER" ]; then exit 1 fi +trap 'cd / && rm -rf "$TARGET_DIR"' EXIT + if [ ! -d "$TARGET_DIR" ]; then echo "Cloning the repository..." git clone "$REPO_URL" "$TARGET_DIR" @@ -23,7 +25,4 @@ chmod +x ./install.sh echo "[ INITIALIZER ]: Setup completed succesfully!" -echo "[ INITIALIZER ]: Cleaning up" -cd / -rm -rf "$TARGET_DIR" echo "[ INITIALIZER ]: Success!"