From 3a5805ea7e8aa385cce278e0026656baa68fa83d Mon Sep 17 00:00:00 2001 From: Evans Mungai Date: Tue, 22 Oct 2024 16:50:58 +0100 Subject: [PATCH] chore: Check tar is installed install script Signed-off-by: Evans Mungai --- scripts/get-helm-3 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/get-helm-3 b/scripts/get-helm-3 index 2292b70ee..5f19bd3fa 100755 --- a/scripts/get-helm-3 +++ b/scripts/get-helm-3 @@ -30,6 +30,7 @@ HAS_WGET="$(type "wget" &> /dev/null && echo true || echo false)" HAS_OPENSSL="$(type "openssl" &> /dev/null && echo true || echo false)" HAS_GPG="$(type "gpg" &> /dev/null && echo true || echo false)" HAS_GIT="$(type "git" &> /dev/null && echo true || echo false)" +HAS_TAR="$(type "tar" &> /dev/null && echo true || echo false)" # initArch discovers the architecture for this system. initArch() { @@ -102,6 +103,11 @@ verifySupported() { if [ "${HAS_GIT}" != "true" ]; then echo "[WARNING] Could not find git. It is required for plugin installation." fi + + if [ "${HAS_TAR}" != "true" ]; then + echo "[ERROR] Could not find tar. It is required to extract the helm binary archive." + exit 1 + fi } # checkDesiredVersion checks if the desired version is available.