Repository navigation
feat(update): allow disabling the update check (#110) - #122
Merged
Merged
Conversation
The startup GitHub release check ran unconditionally on every non-replay run, with no way to opt out — unexpected for package-repo, air-gapped, and privacy-conscious installs. Add five opt-outs. Precedence (higher wins): compiled-out > env > CLI flag > saved preference, resolved by the pure `update::check_disabled`: - `--no-update-check` CLI flag - `DO_NOT_TRACK=1` (cross-tool standard) or `TTL_NO_UPDATE_CHECK=1` env vars - `no_update_check = true` in ~/.config/ttl/config.toml - an Update Check toggle in the TUI Settings modal (persisted to config) - an `update-check` cargo feature (default on); `--no-default-features` compiles the check out and drops the update-informer dependency entirely Adds examples/config.toml documenting the preferences. Surfaces, key names, and env vars mirror the xfr implementation for cross-project consistency.
The --no-update-check help text and update.rs module doc referenced the old positive key (`update_check = false`); the actual preference is `no_update_check = true`. Comment-only.
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.
Adds a full opt-out for the background "newer release available" check (
update-informer→ GitHub API). Requested in #110 for the standard package-manager/CI/privacy courtesy. Mirrors the xfr implementation (lance0/xfr#137) for cross-project consistency.How to turn it off
Precedence (first that applies wins): compiled-out → env → CLI → config/pref.
DO_NOT_TRACK=1(cross-tool standard) orTTL_NO_UPDATE_CHECK=1--no-update-checkno_update_check = truein~/.config/ttl/config.toml(seeexamples/config.toml)s) → Update Check: on/off; persisted to config, sticks across runsupdate-checkcargo feature (default-on);--no-default-featuresdropsupdate-informerfrom the tree entirely — no phone-home code shippedNotes
config.toml, so there is a single preference layer (xfr splits config vs. prefs). Resolution is the pureupdate::check_disabled(env, cli, pref).main, before mode dispatch, so it covers TUI, streaming, JSON/CSV/report, and daemon modes.Validation
clippy -D warningsclean with and without default features;fmtclean.cargo tree --no-default-features -i update-informer→ absent.check_disabled_precedence,flag_is_truthy,no_update_checkprefs roundtrip, settings section/nav).:443traffic): default = 1 connect; each of--no-update-check,DO_NOT_TRACK=1,TTL_NO_UPDATE_CHECK=1, andno_update_check = true= 0;no_update_check = false= 1.