feat: detect old onkernel/tap and show migration instructions#90
feat: detect old onkernel/tap and show migration instructions#90masnwilliams merged 1 commit intomainfrom
Conversation
When users have kernel installed from the deprecated onkernel/tap, show them how to switch to the new kernel/tap instead of the standard upgrade command.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| continue | ||
| } | ||
| // Check if installed from onkernel/tap | ||
| if strings.Contains(string(data), `"tap":"onkernel/tap"`) { |
There was a problem hiding this comment.
JSON string matching may miss whitespace variations
Medium Severity
The isOnOldBrewTap() function uses literal string matching "tap":"onkernel/tap" (no space after colon) to detect the tap source. However, JSON formatting can vary - Homebrew may output "tap": "onkernel/tap" (with space after colon) depending on whether it uses compact or pretty-printed JSON. If the actual file has whitespace differences, the detection silently fails, and users on the old tap receive incorrect upgrade instructions (brew upgrade kernel/tap/kernel) instead of migration instructions. Since the encoding/json package is already imported, parsing the JSON properly would be more reliable.
Summary
kernelinstalled from the oldonkernel/tapinstead ofkernel/tapThis helps users who installed via
onkernel/tap/kernelmigrate tokernel/tap/kernelwhich is where new releases are published.Example output
When a user on
onkernel/tapsees an update available:Test plan
onkernel/tap/kernelinstalledkernel/tap/kernelusersNote
Adds logic to identify Homebrew installs from the deprecated
onkernel/tapby scanningINSTALL_RECEIPT.jsonin common Cellar paths.isOnOldBrewTap()checks for"tap":"onkernel/tap"in Homebrew receiptsprintUpgradeMessagenow warns and showsbrew uninstall kernel+brew install kernel/tap/kernelwhen on old tap; otherwise retains existing upgrade suggestion behaviorWritten by Cursor Bugbot for commit 54cbea0. This will update automatically on new commits. Configure here.