Align auto-update prompt across all installers#1083
Merged
gtrrz-victor merged 4 commits intomainfrom Apr 30, 2026
Merged
Conversation
The 3-option prompt (update / skip / skip until next version) added in PR #1057 only ran for brew. mise, scoop, and the curl-bash fallback still showed the older Y/N huh form with no skip-until-next-version support. Collapse the brew-only branch in MaybeAutoUpdate so every auto-installable install manager goes through the same prompt with the installer command substituted into option 1. Wording stays byte-identical to the brew prompt; only the cmdStr varies. Drop the now-unused Y/N huh form and confirmUpdate seam. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 8b5a28921a47
Contributor
There was a problem hiding this comment.
Pull request overview
Unifies the auto-update prompt flow so all auto-installable installers (brew/mise/scoop/curl-bash) show the same 3-option update prompt, and removes the legacy Y/N confirm path.
Changes:
- Collapses the brew-only auto-update dispatch into a single prompt path with installer-specific command interpolation.
- Removes the old confirm-based prompt seam and updates tests accordingly.
- Extends/adjusts test coverage to assert prompt wording and skip-until-next-version persistence for non-brew installers.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| cmd/entire/cli/versioncheck/autoupdate.go | Removes brew-only branching and standardizes the 3-option prompt + unified selection parsing. |
| cmd/entire/cli/versioncheck/autoupdate_test.go | Refactors fixtures and adds table-driven coverage across installers + updates helper utilities. |
| cmd/entire/cli/versioncheck/versioncheck_test.go | Adds a mise persistence test and updates seams to the unified chooser. |
Replace the hand-rolled stdin reader (bufio + parseUpdateChoice) with a huh.Select form so the prompt matches the rest of the CLI's interactive UX (arrow-key TUI in normal mode, plain numbered prompt under ACCESSIBLE=1). The choose seam now takes (currentVersion, latestVersion, cmdStr) instead of an io.Writer; tests mock the seam directly so the behavioural assertions are unchanged. Drop the now-dead helpers (printUpdateMessage, chooseUpdateFromReader, parseUpdateChoice) and their unit tests; the huh.Select itself is exercised by the manual smoke script (test-auto.sh). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 7b7758d3b29f
Thread the ambient context.Context into chooseUpdate so the huh form respects cancellation (form.RunWithContext) and a stalled prompt can be cleaned up if the parent command is interrupted. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 57d2e9111433
Contributor
Author
|
Follow-up commits
|
Per Copilot review: the table-driven tests using nonWindowsAutoInstallers() would fail on a Windows host because canAutoInstall() blocks brew and the curl-bash fallback there. Pin the goos seam to a non-Windows value at the start of each table-driven test so they're robust regardless of the host runtime.GOOS. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 587b53a75aa0
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.
https://entire.io/gh/entireio/cli/trails/270
Summary
PR #1057 added a 3-option auto-update prompt (Update / Skip / Skip until next version) for brew users. Other installers (mise, scoop, curl-bash) still saw the older Y/N huh form with no skip-until-next-version support.
This PR collapses the brew-only dispatch in
MaybeAutoUpdateso every auto-installable install manager goes through the same prompt. The wording stays byte-identical to the brew prompt — only thecmdStrinterpolated into option 1 varies (mise upgrade entire,scoop update entire/cli,curl -fsSL https://entire.io/install.sh | bash). The skip-until-next-version cache in~/.config/entire/version_check.jsonis already installer-agnostic, so persistence works for free.The unused Y/N huh form (
realConfirmUpdate) and itsconfirmUpdatetest seam are deleted.Windows + unknown installer behaviour is unchanged: still prints the downloads-page hint, no prompt (no command to auto-run).
Outputs
Test plan
mise run check(build + lint + unit + integration + Vogon canary) — passing locally./test-auto.sh [brew|mise|scoop|bash](script bundled in branch but untracked) — verifies prompt shows correctruns <cmd>per installer./test-auto.sh mise --keep-home)ENTIRE_NO_AUTO_UPDATE=1still suppresses the prompt for every installer🤖 Generated with Claude Code
Note
Medium Risk
Changes the CLI’s auto-update interaction and command execution path for non-brew installers, so regressions could affect update prompting/auto-run behavior across platforms despite strong test coverage.
Overview
Auto-update prompting is unified so all auto-installable install managers (brew, mise, scoop, curl-bash fallback) use the same 3-option menu (Update now / Skip / Skip until next version), instead of only brew getting the 3-option prompt while others used a separate Y/N confirmation flow.
The old
huh-basedconfirmUpdatepath is removed, the prompt/choice parsing is renamed to installer-agnosticchooseUpdate/parseUpdateChoice, and non-interactive/kill-switch behavior consistently prints the exact manual update command; Windows + unknown installer continues to show the releases download page (no prompt/auto-run). Tests are refactored and expanded to validate the prompt text/command interpolation and skip-until-next-version caching across installers (including mise).Reviewed by Cursor Bugbot for commit ecba1ad. Configure here.