Skip to content

Conversation

@rgarcia
Copy link
Contributor

@rgarcia rgarcia commented Jan 9, 2026

Summary

  • Add a new kernel upgrade command (with update alias) that automatically detects how kernel was installed (brew, pnpm, npm, bun) and runs the appropriate upgrade command
  • Falls back to manual wget/tar instructions for unknown installation methods
  • Shows release URL so users can view release notes
  • Add --dry-run flag to preview what would be executed (shows detected method, binary path, and command)
  • Detects Homebrew upgrade failures and suggests uninstall/untap/reinstall for old tap users
  • Move DetectInstallMethod to pkg/update and refactor SuggestUpgradeCommand to use it
  • Export FetchLatest and IsNewerVersion from pkg/update for reuse
  • Remove obsolete old-tap migration logic (taps now mirrored on both orgs)
  • Add upgrade to auth-exempt commands list (no authentication required)

Test plan

  • go build ./... passes
  • go test ./... passes
  • kernel upgrade --help displays correct usage information
  • kernel update --help works (alias)
  • kernel upgrade --dry-run shows the detected installation method, binary path, and upgrade command
  • Manual testing: run kernel upgrade with different installation methods (brew, npm, pnpm, bun)

Note

Adds a user-facing upgrade flow and exposes update utilities for reuse.

  • New kernel upgrade command (alias update) with --dry-run, release notes display, and method-aware execution (brew, pnpm, npm, bun); falls back to manual instructions when unknown
  • Detects Homebrew old-tap error and prints uninstall/untap/reinstall guidance
  • Wires upgrade into root command and marks it auth-exempt
  • Refactors update package: export FetchLatest and IsNewerVersion; add DetectInstallMethod and InstallMethod enum; update SuggestUpgradeCommand to use detection
  • Update periodic update check to use exported helpers

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

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
Copy link
Contributor

@tembo tembo bot left a 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
@rgarcia rgarcia requested a review from tnsardesai January 11, 2026 14:12
printManualUpgradeInstructions(latestTag, binaryPath)
// Return nil since we've provided manual instructions - don't fail scripts
return nil
}
Copy link

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.

Fix in Cursor Fix in Web

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.

2 participants