From c939cfbaca3edadbb383fde7214a861c0ddd30b5 Mon Sep 17 00:00:00 2001 From: Elias Kickbush Date: Sun, 14 Jun 2026 17:05:54 +0000 Subject: [PATCH 1/2] Added unzip to check_dependencies --- lib/helpers.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/helpers.sh b/lib/helpers.sh index c1eabcb..a41554d 100755 --- a/lib/helpers.sh +++ b/lib/helpers.sh @@ -153,13 +153,13 @@ export -f check_default_version; function cleanup() { log 'info' 'Performing cleanup'; local pwd="$(pwd)"; - + # Safety check to ensure TFENV_CONFIG_DIR is set and not empty if [ -z "${TFENV_CONFIG_DIR:-""}" ]; then log 'error' 'TFENV_CONFIG_DIR is not set, cannot perform cleanup safely'; return 1; fi; - + log 'debug' "Deleting ${TFENV_CONFIG_DIR}/version"; rm -rf "${TFENV_CONFIG_DIR}/version"; log 'debug' "Deleting ${TFENV_CONFIG_DIR}/version.prev"; @@ -200,6 +200,10 @@ function check_dependencies() { log 'error' 'GNU Grep is a requirement and your Mac does not have it. Consider "brew install grep" or "nix profile install nixpkgs#gnugrep"'; fi; + + if ! command -v unzip >/dev/null 2>&1; then + log 'error' 'unzip is a requirement and your device does not have it. Install unzip using your preferred method.' + fi; }; export -f check_dependencies; From 711b069b3158194d9d257bb1047b742d631eba37 Mon Sep 17 00:00:00 2001 From: Elias Kickbush Date: Sun, 14 Jun 2026 17:18:42 +0000 Subject: [PATCH 2/2] Added missing ; --- lib/helpers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/helpers.sh b/lib/helpers.sh index a41554d..27e35c6 100755 --- a/lib/helpers.sh +++ b/lib/helpers.sh @@ -202,7 +202,7 @@ function check_dependencies() { fi; if ! command -v unzip >/dev/null 2>&1; then - log 'error' 'unzip is a requirement and your device does not have it. Install unzip using your preferred method.' + log 'error' 'unzip is a requirement and your device does not have it. Install unzip using your preferred method.'; fi; }; export -f check_dependencies;