Skip to content

Commit

Permalink
Merge pull request #11494 from Wonong/add-check-git
Browse files Browse the repository at this point in the history
Add a flag var to check git is installed or not
  • Loading branch information
hickeyma committed Nov 28, 2022
2 parents 3974136 + 0ebd620 commit 21e694e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/get-helm-3
Expand Up @@ -29,6 +29,7 @@ HAS_CURL="$(type "curl" &> /dev/null && echo true || echo false)"
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)"

# initArch discovers the architecture for this system.
initArch() {
Expand Down Expand Up @@ -97,6 +98,10 @@ verifySupported() {
exit 1
fi
fi

if [ "${HAS_GIT}" != "true" ]; then
echo "[WARNING] Could not find git. It is required for plugin installation."
fi
}

# checkDesiredVersion checks if the desired version is available.
Expand Down

0 comments on commit 21e694e

Please sign in to comment.