[bug]: checkLatestRelease() fails when GitHub API returns compact JSON
@vihar is already working on this.
Since Mar 19, 2026.
- Dominant language
- TypeScript
- Stars
- 59.6k
- Forks
- 5.8k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 49
Description
Is there an existing issue for this?
- I have searched the existing issues
Current behavior
This is related to #6162 which addressed a similar issue in checkLatestRelease() but did not fix the root cause.
The checkLatestRelease() function in deployments/cli/community/install.sh uses grep to extract the tag_name from the GitHub API response:
grep -o '"tag_name": "[^"]*"'
This assumes a space after the colon ("tag_name": "v1.2.3"), but the GitHub API sometimes returns compact JSON without spaces ("tag_name":"v1.2.3"), causing grep to match nothing and the upgrade to fail with:
Failed to check for the latest release. Exiting...
Fix: Replace the grep | sed pipeline with python3 which is available on all supported systems:
local latest_release=$(curl -sSL https://api.github.com/repos/$GH_REPO/releases/latest | python3 -c "import sys,json; print(json.load(sys.stdin)['tag_name'])")
Affected: setup.sh Option 5 (Upgrade)
Steps to reproduce
- Run ./setup.sh
- Select Option 5 (Upgrade)
- Script calls checkLatestRelease() which calls the GitHub API
- GitHub API returns compact JSON without spaces after colons
- grep -o '"tag_name": "[^"]*"' matches nothing
- Script exits with "Failed to check for the latest release. Exiting..."
Environment
Production
Browser
None
Variant
Self-hosted
Version
v1.2.3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.