From 317f63e7a579e4eb82b21981abe3336fb87bf7b7 Mon Sep 17 00:00:00 2001 From: Abhay Date: Sun, 19 Apr 2026 07:43:27 +0530 Subject: [PATCH] fix: handle compact JSON in checkLatestRelease() --- deployments/cli/community/install.sh | 2 +- deployments/swarm/community/swarm.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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