fix(update): make openboot update call brew transparently on Homebrew installs#58
Merged
Merged
Conversation
…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.
|
👋 Thanks for opening this pull request! Before merging:
@fullstackjam will review this soon. Thanks for contributing! 🚀 |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
openboot updateon 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.brew upgrade openbootitself, reusing the same path AutoUpgrade'senabledmode already uses (updater.execBrewUpgrade, newly exposed asupdater.BrewUpgrade).--versionand--rollbackstill refuse on brew installs; neither maps cleanly to brew semantics (no arbitrary version pin, no~/.openboot/backuprollback path).Test plan
make test-unit— green, archtest baseline regenerated for line-number shift only (no new violations)TestRunUpdate_HomebrewLatestCallsBrew— happy path invokes brew exactly onceTestRunUpdate_HomebrewLatestPropagatesBrewError— brew failure surfaces asupdate failed: ...TestRunUpdate_HomebrewLatestDryRunSkipsBrew—--dry-runprints intent without invoking brewopenboot updaterunsbrew upgrade openbootand exits cleanly