Skip to content

vscode: Detect mise via shell PATH like other version managers#4109

Open
knu wants to merge 1 commit into
Shopify:mainfrom
knu:detect-mise-via-shell-path
Open

vscode: Detect mise via shell PATH like other version managers#4109
knu wants to merge 1 commit into
Shopify:mainfrom
knu:detect-mise-via-shell-path

Conversation

@knu
Copy link
Copy Markdown

@knu knu commented May 14, 2026

Motivation

Previously mise was the only version manager whose detection and executable resolution relied solely on a hardcoded list of installation directories. Users who installed mise outside of ~/.local/bin, /opt/homebrew/bin, or /usr/bin had to set miseExecutablePath explicitly, even when mise was already on their shell PATH.

Implementation

Align mise with rbenv, rv, and asdf:

  • Replace detectMise() with the standard toolExists("mise") probe, which runs mise --version through the user's interactive shell so any PATH is honored.
  • Rewrite Mise#findMiseUri as Mise#findMise using findExec, so installations under the well-known directories are still preferred while unknown locations fall back to the shell PATH.
  • Add /usr/local/bin and /home/linuxbrew/.linuxbrew/bin to the candidate list to cover Homebrew Intel and Linuxbrew installations that were previously missed.

Automated Tests

vscode/src/ruby/mise.ts

Previously mise was the only version manager whose detection and
executable resolution relied solely on a hardcoded list of installation
directories. Users who installed mise outside of `~/.local/bin`,
`/opt/homebrew/bin`, or `/usr/bin` had to set `miseExecutablePath`
explicitly, even when `mise` was already on their shell `PATH`.

Align mise with rbenv, rv, and asdf:

- Replace `detectMise()` with the standard `toolExists("mise")` probe,
  which runs `mise --version` through the user's interactive shell so
  any `PATH` is honored.
- Rewrite `Mise#findMiseUri` as `Mise#findMise` using `findExec`, so
  installations under the well-known directories are still preferred
  while unknown locations fall back to the shell `PATH`.
- Add `/usr/local/bin` and `/home/linuxbrew/.linuxbrew/bin` to the
  candidate list to cover Homebrew Intel and Linuxbrew installations
  that were previously missed.
@knu knu requested a review from a team as a code owner May 14, 2026 17:50
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.

1 participant