From 50d3485c1c25626adf931d8fccbed9d467ce0142 Mon Sep 17 00:00:00 2001 From: Kevin Lundberg Date: Sat, 21 Sep 2024 00:14:54 -0400 Subject: [PATCH] Fix SC2155 failure --- bin/install | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/install b/bin/install index 9d0c2d0..8ad5712 100755 --- a/bin/install +++ b/bin/install @@ -19,7 +19,8 @@ esac DOWNLOAD_URL="https://github.com/realm/SwiftLint/releases/download/$ASDF_INSTALL_VERSION/$ARCHIVE_NAME.zip" # make a temporary download directory with a cleanup hook -readonly TMP_DOWNLOAD_DIR="$(mktemp -d -t "asdf_swiftlint_XXXXXX")" +TMP_DOWNLOAD_DIR="$(mktemp -d -t "asdf_swiftlint_XXXXXX")" +readonly TMP_DOWNLOAD_DIR trap 'rm -rf "${TMP_DOWNLOAD_DIR?}"' EXIT SWIFTLINT_DOWNLOAD_PATH="$TMP_DOWNLOAD_DIR/swiftlint.zip"