Skip to content

fix(update): make openboot update call brew transparently on Homebrew installs#58

Merged
fullstackjam merged 1 commit into
mainfrom
fix/update-calls-brew-transparently
May 16, 2026
Merged

fix(update): make openboot update call brew transparently on Homebrew installs#58
fullstackjam merged 1 commit into
mainfrom
fix/update-calls-brew-transparently

Conversation

@fullstackjam
Copy link
Copy Markdown
Collaborator

Summary

  • openboot update on a Homebrew-managed install previously errored with "use 'brew upgrade openboot'". That was a UX leak — the user expressed intent ("update"), so the tool should just do it.
  • Now the command detects the Homebrew install and invokes brew upgrade openboot itself, reusing the same path AutoUpgrade's enabled mode already uses (updater.execBrewUpgrade, newly exposed as updater.BrewUpgrade).
  • --version and --rollback still refuse on brew installs; neither maps cleanly to brew semantics (no arbitrary version pin, no ~/.openboot/backup rollback path).

Test plan

  • make test-unit — green, archtest baseline regenerated for line-number shift only (no new violations)
  • New unit tests:
    • TestRunUpdate_HomebrewLatestCallsBrew — happy path invokes brew exactly once
    • TestRunUpdate_HomebrewLatestPropagatesBrewError — brew failure surfaces as update failed: ...
    • TestRunUpdate_HomebrewLatestDryRunSkipsBrew--dry-run prints intent without invoking brew
  • Manual smoke on a brew-managed install — confirm openboot update runs brew upgrade openboot and exits cleanly

…ew installs

Previously `openboot update` on a Homebrew-managed install returned an
error telling the user to run `brew upgrade openboot` instead. That
leaks an implementation detail (how openboot was installed) into the
user's flow — they typed `update` because they wanted to update.

Now the command detects the Homebrew install and calls
`updater.BrewUpgrade()` directly (same code path AutoUpgrade's
`enabled` mode already uses). `--version` and `--rollback` still
refuse on brew installs since neither maps cleanly to brew semantics.

The archtest baseline shift is a pure line-number bump from inserting
the new exported function — no new violation.
@github-actions
Copy link
Copy Markdown

👋 Thanks for opening this pull request!

Before merging:

  • Code follows existing patterns in the codebase
  • go build ./... and go vet ./... pass
  • Commit message is clear and descriptive

@fullstackjam will review this soon. Thanks for contributing! 🚀

@github-actions github-actions Bot added the tests Tests only label May 16, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 16, 2026

Codecov Report

❌ Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/updater/updater.go 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@fullstackjam fullstackjam merged commit 7118591 into main May 16, 2026
14 checks passed
@fullstackjam fullstackjam deleted the fix/update-calls-brew-transparently branch May 16, 2026 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Tests only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant