Add a setting to disable lstk update checks - #465
Draft
anisaoshafi wants to merge 4 commits into
Draft
Conversation
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
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.
Motivation
lstk asks you to update on every start, with no way to turn it off. With weekly releases, "skip this version" just delays the prompt by a few days.
It is also wrong when another tool installed lstk. mise, Nix, asdf, Scoop and Chocolatey own the binary, so lstk should not replace it. On Nix it cannot: the store is read-only.
Solution
A new
[cli] update_checksetting, also available asLSTK_UPDATE_CHECK:prompt: ask before updating (today's behaviour, still the default)notify: print one line and carry on, no waiting for inputoff: no check at all, no output, no network requestInstalls owned by another package manager get
notifyautomatically, pointing at that tool instead oflstk update:lstk updatenow refuses on those installs and says how to update instead.lstk update --checkstill works, and runninglstk updateyourself always checks, whatever the setting says.The prompt also gained a
[N] Don't ask againoption, which savesnotifyto your config. No docs needed to find it.A bad value is reported and ignored, so a typo cannot stop
lstk start.Also fixes a bug: the non-interactive path built its own options and ignored
update_skipped_version. Both paths now share one policy.Docs
User-facing, needs documenting:
[cli] update_check(prompt/notify/off, defaultprompt), and new env varLSTK_UPDATE_CHECKwhich overrides it.lstk updatenow exits non-zero on installs owned by mise, asdf, Nix, Scoop or Chocolatey, with a new JSON error codeUPDATE_EXTERNALLY_MANAGED.Already updated here:
default_config.toml(which had no[cli]section before),docs/structured-output.md,README.md,lstk update --help.Review
Human review advised. Changes default behaviour for some installs, and adds a public config key, env var, and JSON error code.
Closes DEVX-1029