fix: Hide update button if self-update is not available#129
Conversation
If you have Mise installed using a package manager, such as Homebrew, the plugin still prompts to install available updates, even though it will fail. Ideally there would be data available in `mise doctor`, or some other command, to determine if we can `self-update`, but there is not, so this PR reimplements the [`is_available()` function from `SelfUpdate`](https://github.com/jdx/mise/blob/863505d4089126780c2352fb1218c6550c3cf9d8/src/cli/self_update.rs#L100). Fixes hverlin#122.
|
Hi @hverlin - thanks for your work on the Mise VSCode plugin 👍. I currently can't use the There don't appear to be any tests for |
|
Thank you for contributing! Ideally we should indeed rely on mise doctor output but this will do until it's eventually added to mise itself. |
That was quick! Thanks @hverlin 👍 Will you cut a new release with this change in it? |
|
A new release should be available now ✅ |
Related to hverlin/mise-vscode#129. --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
If you have Mise installed using a package manager, such as Homebrew, the plugin still prompts to install available updates, even though it will fail.
Ideally there would be data available in
mise doctor, or some other command, to determine if we canself-update, but there is not, so this PR reimplements theis_available()function fromSelfUpdate.Fixes #122.