diff --git a/deployments/cli/community/install.sh b/deployments/cli/community/install.sh index accd89c812d..52b46168d05 100755 --- a/deployments/cli/community/install.sh +++ b/deployments/cli/community/install.sh @@ -57,7 +57,7 @@ function spinner() { function checkLatestRelease(){ echo "Checking for the latest release..." >&2 - local latest_release=$(curl -sSL https://api.github.com/repos/$GH_REPO/releases/latest | grep -o '"tag_name": "[^"]*"' | sed 's/"tag_name": "//;s/"//g') + local latest_release=$(curl -sSL https://api.github.com/repos/$GH_REPO/releases/latest | grep -o '"tag_name":[ ]*"[^"]*"' | sed 's/"tag_name":[ ]*"//;s/"//g') if [ -z "$latest_release" ]; then echo "Failed to check for the latest release. Exiting..." >&2 exit 1 diff --git a/deployments/swarm/community/swarm.sh b/deployments/swarm/community/swarm.sh index 02f170f4d37..90b90c954df 100755 --- a/deployments/swarm/community/swarm.sh +++ b/deployments/swarm/community/swarm.sh @@ -38,7 +38,7 @@ EOF function checkLatestRelease(){ echo "Checking for the latest release..." >&2 - local latest_release=$(curl -s https://api.github.com/repos/$GH_REPO/releases/latest | grep -o '"tag_name": "[^"]*"' | sed 's/"tag_name": "//;s/"//g') + local latest_release=$(curl -s https://api.github.com/repos/$GH_REPO/releases/latest | grep -o '"tag_name":[ ]*"[^"]*"' | sed 's/"tag_name":[ ]*"//;s/"//g') if [ -z "$latest_release" ]; then echo "Failed to check for the latest release. Exiting..." >&2 exit 1