bun upgrade: honor install.minimumReleaseAge - #30534
Closed
robobun wants to merge 3 commits into
Closed
Claude / Claude Code Review
completed
May 12, 2026 in 11m 48s
Code review found 1 important issue
Found 5 candidates, confirmed 2. See review comments for details.
Details
| Severity | Count |
|---|---|
| 🔴 Important | 1 |
| 🟡 Nit | 0 |
| 🟣 Pre-existing | 0 |
| Severity | File:Line | Issue |
|---|---|---|
| 🔴 Important | src/cli/upgrade_command.zig:462-472 |
Fallback releases-list loop can downgrade Bun and select prereleases |
Annotations
Check failure on line 472 in src/cli/upgrade_command.zig
claude / Claude Code Review
Fallback releases-list loop can downgrade Bun and select prereleases
The fallback loop returns the first release whose `published_at` is outside the window with no other filtering, so it can return a release **older than the currently-installed Bun** — and since `_exec` only checks `version.isCurrent()` (exact equality, not `>`), `bun upgrade` will then silently downgrade the binary. The loop should skip candidates whose tag is `<=` the current version (or `_exec` should treat a selected version `<` current as "already on latest"); it would also be worth skipping
Loading