-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Open
Labels
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
Reactions are currently unavailable