-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add kernel upgrade command
#68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Add a new upgrade command that automatically detects how kernel was installed (brew, pnpm, npm, bun) and runs the appropriate upgrade command. Falls back to manual wget instructions for unknown installation methods. - Export FetchLatest and IsNewerVersion from pkg/update for reuse - Add --dry-run flag to preview upgrade command without executing - Add upgrade to auth-exempt commands list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice addition—kernel upgrade is a big UX win.
Left a few inline nits mostly around making --dry-run output more informative, making manual instructions paste-safe, and thinking about whether “unknown install method” should be a non-zero exit once you’ve printed manual steps.
- Add "update" as alias for "upgrade" command - Show release URL when new version is available - Normalize version display (strip 'v' prefix from both versions) - Move DetectInstallMethod to pkg/update for reuse by SuggestUpgradeCommand - Remove obsolete old-tap migration logic (taps now mirrored on both orgs)
- Make --dry-run output more informative (show detected method and binary path) - Quote binaryPath in manual instructions for paths with spaces - Detect Homebrew upgrade failure and suggest uninstall/untap/reinstall
- Refactor to struct pattern (UpgradeCmd/UpgradeInput) for testability - DRY up command duplication with shared upgradeCommandArgs() - Capture stderr to detect old Homebrew tap errors specifically - Return success on unknown install method (manual instructions shown) - Remove generic brew failure message, only show when old tap detected
| printManualUpgradeInstructions(latestTag, binaryPath) | ||
| // Return nil since we've provided manual instructions - don't fail scripts | ||
| return nil | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--dry-run flag ignored for unknown install method
Medium Severity
The check for InstallMethodUnknown at lines 61-65 returns early before the --dry-run check at line 67. This causes printManualUpgradeInstructions to be called and actual instructions to be printed even when --dry-run is passed. Users expect --dry-run to preview behavior without taking actions, but for unknown install methods the flag is completely ignored. The dry-run check needs to happen before or within the unknown method handling.
Summary
kernel upgradecommand (withupdatealias) that automatically detects how kernel was installed (brew, pnpm, npm, bun) and runs the appropriate upgrade command--dry-runflag to preview what would be executed (shows detected method, binary path, and command)DetectInstallMethodtopkg/updateand refactorSuggestUpgradeCommandto use itFetchLatestandIsNewerVersionfrompkg/updatefor reuseupgradeto auth-exempt commands list (no authentication required)Test plan
go build ./...passesgo test ./...passeskernel upgrade --helpdisplays correct usage informationkernel update --helpworks (alias)kernel upgrade --dry-runshows the detected installation method, binary path, and upgrade commandkernel upgradewith different installation methods (brew, npm, pnpm, bun)Note
Adds a user-facing upgrade flow and exposes update utilities for reuse.
kernel upgradecommand (aliasupdate) with--dry-run, release notes display, and method-aware execution (brew, pnpm, npm, bun); falls back to manual instructions when unknownupgradeinto root command and marks it auth-exemptFetchLatestandIsNewerVersion; addDetectInstallMethodandInstallMethodenum; updateSuggestUpgradeCommandto use detectionWritten by Cursor Bugbot for commit 3168d20. This will update automatically on new commits. Configure here.