You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
install.sh fails: tag_name parsing breaks on compact GitHub API JSON #411
GitHub's API now returns compact single-line JSON for /releases/latest. With no newlines, grep matches the whole blob and cut -d'"' -f4 returns the url field instead of the tag, so VERSION becomes e.g.:
The download URLs are then invalid, both curl downloads fail silently (2>/dev/null), and the script falls through to build-from-source (needs git+cargo) or errors out.
Reproduction
curl -fsSL "https://api.github.com/repos/1jehuang/jcode/releases/latest"| grep '"tag_name"'| cut -d'"' -f4
# prints a URL, not v0.31.2
Fix
Keep it dependency-free (no jq) but make it newline-agnostic:
GitHub's /releases/latest API non-deterministically returns compact (single-line) vs pretty-printed (multi-line) JSON. The current parser only handles the pretty-printed case, which is why the failure is intermittent.
Tested both parsers against pretty and forced-compact responses:
On the compact response the OLD grep '"tag_name"' | cut -d'"' -f4 returns the url field instead of the tag. The proposed grep -o '"tag_name": *"[^"]*"' | head -1 | cut -d'"' -f4 extracts only the tag_name substring and works for both formats — no jq dependency added.
Triage: reproducible, autonomous: clear. GitHub's /releases/latest now returns compact single-line JSON, so grep '"tag_name"' | cut -d'"' -f4 matches the whole blob and returns a URL. Fixed by isolating the field with grep -o '"tag_name" *: *"[^"]*"' (works for compact and pretty JSON). Fix in #417.
Activity
ravshansbox commentedon Jun 28, 2026
Verified the root cause and the proposed fix.
GitHub's
/releases/latestAPI non-deterministically returns compact (single-line) vs pretty-printed (multi-line) JSON. The current parser only handles the pretty-printed case, which is why the failure is intermittent.Tested both parsers against pretty and forced-compact responses:
v0.31.2v0.31.2https://api.github.com/repos/1jehuang/jcode/releases/342601544v0.31.2On the compact response the OLD
grep '"tag_name"' | cut -d'"' -f4returns theurlfield instead of the tag. The proposedgrep -o '"tag_name": *"[^"]*"' | head -1 | cut -d'"' -f4extracts only thetag_namesubstring and works for both formats — nojqdependency added.1jehuang commentedon Jun 29, 2026
Triage: reproducible, autonomous: clear. GitHub's
/releases/latestnow returns compact single-line JSON, sogrep '"tag_name"' | cut -d'"' -f4matches the whole blob and returns a URL. Fixed by isolating the field withgrep -o '"tag_name" *: *"[^"]*"'(works for compact and pretty JSON). Fix in #417.Triage fixes: install.sh, /config edit, FreeBSD, .agents skills, MCP …
fix(install): parse tag_name from compact GitHub API JSON (#411)
fix(install): parse tag_name from compact GitHub API JSON (1jehuang#411)
Triage fixes: install.sh, /config edit, FreeBSD, .agents skills, MCP …
fix(install): parse tag_name from compact GitHub API JSON (1jehuang#411)
Triage fixes: install.sh, /config edit, FreeBSD, .agents skills, MCP …