Skip to content

Fix/install script rate limit handling#354

Open
patelspratik wants to merge 3 commits intomainfrom
fix/install-script-rate-limit-handling
Open

Fix/install script rate limit handling#354
patelspratik wants to merge 3 commits intomainfrom
fix/install-script-rate-limit-handling

Conversation

@patelspratik
Copy link
Copy Markdown
Contributor

iteration of #350

brycelelbach and others added 2 commits April 13, 2026 16:30
The install scripts used `curl -s` which silently swallows HTTP errors.
When the GitHub API returns a 403 (rate limit) or other failure, the
scripts would either print a misleading "Could not find release" error
or, in the case of install-latest-linux.sh, proceed with an empty URL.

Switch to `curl -sf` so HTTP errors produce a non-zero exit code, and
add explicit error handling with a clear message about rate limiting.
Also add a missing empty-URL guard to install-latest-linux.sh.
@patelspratik patelspratik requested a review from theFong April 13, 2026 23:33
drewmalin
drewmalin previously approved these changes Apr 14, 2026
Comment thread bin/install-latest.sh Outdated

# Verify we found a suitable release
# Extract the download URL for this platform
DOWNLOAD_URL="$(echo "${API_RESPONSE}" | grep "browser_download_url.*${OS}.*${ARCH}" | cut -d '"' -f 4)"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bit of a corner case but since we have both -o pipefail (treat any command failure in a pipe as the cause of the pipefail) and -e (treat any command failure as a full script failure) if grep doesn't find the line it's looking for, which will prompt a 1 exit code from grep, then we will just fail rather than moving on to the below if-statement.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Used Claude to add a || true which should just swallow the exit code and rely on whatever DOWNLOAD_URL is to decide what to do.

Comment thread bin/install-latest-linux.sh Outdated
@@ -1,8 +1,23 @@
#!/usr/bin/env bash
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does anything use this file anymore?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't look like it. I'll remove.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants