Skip to content

armgit / Ix

Public Imported from GitHub
0

Understand any codebase instantly. System intelligence for codebases, built for humans and AI.

fix(install): fix version parsing from GitHub API single-line JSON

Tanner Kocher1ff10e265221
diff --git a/scripts/install/install.sh b/scripts/install/install.sh
index 3ca1826c..a7fa237c 100755
--- a/scripts/install/install.sh
+++ b/scripts/install/install.sh
@@ -81,7 +81,7 @@ resolve_version() {
if command -v curl >/dev/null 2>&1; then
local latest
latest=$(curl -fsSL "https://api.github.com/repos/${GITHUB_ORG}/${GITHUB_REPO}/releases/latest" 2>/dev/null \
- | grep '"tag_name"' | head -1 | sed 's/.*"v\(.*\)".*/\1/' || true)
+ | sed -n 's/.*"tag_name"[[:space:]]*:[[:space:]]*"v\([^"]*\)".*/\1/p' || true)
if [ -n "$latest" ]; then
echo "$latest"
return