Commit 60542c1
authored
feat: detect old onkernel/tap and show migration instructions (#90)
## 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
<!-- CURSOR_SUMMARY -->
---
> [!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
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
54cbea0. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent ca377b6 commit 60542c1
1 file changed
Lines changed: 45 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
128 | 161 | | |
129 | 162 | | |
130 | 163 | | |
| |||
134 | 167 | | |
135 | 168 | | |
136 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
137 | 182 | | |
138 | 183 | | |
139 | 184 | | |
| |||
0 commit comments