Skip to content

Conversation

@masnwilliams
Copy link
Contributor

@masnwilliams masnwilliams commented Jan 21, 2026

Summary

  • Detects when users have kernel installed from the old onkernel/tap instead of kernel/tap
  • Shows migration instructions instead of the standard upgrade command when on the old tap

This helps users who installed via onkernel/tap/kernel migrate to kernel/tap/kernel which is where new releases are published.

Example output

When a user on onkernel/tap sees an update available:

 INFO  A new release of kernel is available: 0.13.5 → 0.14.0
 INFO  Release notes: https://github.com/kernel/cli/releases/tag/v0.14.0

 WARNING  You have kernel installed from the old tap (onkernel/tap).
 WARNING  To upgrade, switch to the new tap:

  brew uninstall kernel
  brew install kernel/tap/kernel

Test plan

  • Verify detection works on a machine with onkernel/tap/kernel installed
  • Verify normal upgrade message shows for kernel/tap/kernel users
  • Verify non-Homebrew installs still show normal upgrade message

Note

Adds logic to identify Homebrew installs from the deprecated onkernel/tap by scanning INSTALL_RECEIPT.json in common Cellar paths.

  • New isOnOldBrewTap() checks for "tap":"onkernel/tap" in Homebrew receipts
  • printUpgradeMessage now warns and shows brew uninstall kernel + brew install kernel/tap/kernel when on old tap; otherwise retains existing upgrade suggestion behavior

Written by Cursor Bugbot for commit 54cbea0. This will update automatically on new commits. Configure here.

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.
@masnwilliams masnwilliams requested a review from rgarcia January 21, 2026 23:10
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

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"`) {
Copy link

Choose a reason for hiding this comment

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

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.

Fix in Cursor Fix in Web

@masnwilliams masnwilliams merged commit 60542c1 into main Jan 21, 2026
2 checks passed
@masnwilliams masnwilliams deleted the mason/detect-old-homebrew-tap branch January 21, 2026 23:42
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