fix(install): fallback to releases API when latest.json is unavailable - #118
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The fallback lacks a required User-Agent, and the changeset does not publish the fix.
Pull request overview
Updates the macOS installer to find prerelease assets through the GitHub Releases API when latest.json is unavailable.
Changes:
- Adds fallback release asset discovery.
- Documents the installer behavior change.
File summaries
| File | Review summary |
|---|---|
scripts/install-macos.sh |
Fallback needs a descriptive User-Agent header for GitHub API requests. Moderate (1 vote). |
.changeset/install-macos-prerelease-fallback.md |
Declare a patch changeset so the fix is published. Moderate (1 vote). |
Review details
Suppressed comments (2)
.changeset/install-macos-prerelease-fallback.md:2
- This is the empty changeset form, so Changesets will not bump
flintor include this user-facing install fix in the next release. The empty form is used for docs-only changes in this repository; please declare a patch for theflintpackage so this fix is actually published.
---
---
scripts/install-macos.sh:41
- The GitHub REST API requires a
User-Agentheader, but this fallback only sendsAccept. On a prerelease, the manifest request 404s and this request is then rejected (typically with 403), so the new fallback still cannot find an asset. Add a descriptive user agent, consistent with the existing GitHub API calls inscripts/ensure-bundled-node.cjs:125andsidecar/foundry-sidecar.js:3167.
RELEASES_JSON="$(curl -fsSL -H "Accept: application/vnd.github+json" "https://api.github.com/repos/$REPO/releases" 2>/dev/null || true)"
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/install-macos.sh) was queryinghttps://github.com/joelst/flint/releases/latest/download/latest.json.releases/latestpointer 404s by design.https://api.github.com/repos/joelst/flint/releases) whenlatest.jsonis not found, so prereleases can be installed seamlessly.