From 1a95f375349fb4e1c4d2ba078fd3334089ca4a8d Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Tue, 28 Nov 2023 15:15:26 +0300 Subject: [PATCH] Fix conditional statement for fetching latest version of Vault --- vault-github/run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vault-github/run.sh b/vault-github/run.sh index da252cb..880030f 100644 --- a/vault-github/run.sh +++ b/vault-github/run.sh @@ -31,8 +31,8 @@ unzip() { fi } -# Fetch latest version of Vault if VERSION is 'latest' -if [ "$${INSTALL_VERSION}" == "latest" ]; then +# Fetch latest version of Vault if INSTALL_VERSION is 'latest' +if [ "$${INSTALL_VERSION}" = "latest" ]; then LATEST_VERSION=$(curl -s https://releases.hashicorp.com/vault/ | grep -oP 'vault/\K[0-9]+\.[0-9]+\.[0-9]+' | sort -V | tail -n 1) printf "Latest version of Vault is %s.\n\n" "$${LATEST_VERSION}" if [ -z "$${LATEST_VERSION}" ]; then