Skip to content

Only show update notice on --help output#112

Merged
sdairs merged 1 commit intomainfrom
issue-111-update-notice-help-only
Apr 14, 2026
Merged

Only show update notice on --help output#112
sdairs merged 1 commit intomainfrom
issue-111-update-notice-help-only

Conversation

@sdairs
Copy link
Copy Markdown
Collaborator

@sdairs sdairs commented Apr 14, 2026

Summary

  • Moves the "new version available" notice so it only appears on --help and --version output, not during regular command execution
  • Uses try_parse() to intercept clap's help/version display, appends the update notice after it
  • Background cache refresh still runs on all non-update commands so the notice stays fresh

Closes #111

Test plan

  • clickhousectl local list — no update notice in output
  • clickhousectl --help — update notice appears after help text
  • clickhousectl local list --help — update notice appears after help text
  • clickhousectl update — works as before
  • All 306 tests pass, clippy clean

🤖 Generated with Claude Code

Moves the cached update notice from the normal command execution path to
the --help/--version path. Uses try_parse() to intercept clap's help
display, appends the update notice after it, then exits. Regular commands
no longer print the notice but still refresh the cache in the background.

Closes #111

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sdairs sdairs requested a review from iskakaushik as a code owner April 14, 2026 13:52
@sdairs sdairs deployed to cloud-integration April 14, 2026 13:52 — with GitHub Actions Active
@sdairs sdairs merged commit 2c6fca8 into main Apr 14, 2026
10 checks passed
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.

clickhousectl self updater only show available update in --help

2 participants