-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VSCode extension checks multiple install locations for mise
binary
#2943
Conversation
I'd love some feedback/suggestions on how you'd like to see me approach testing this. Did you want me to set up a fake directory tree and confirm that a binary is found? I didn't notice any other tests that are similar, and even throwing an error inside the existing code block seems to keep all the tests green, so I am presuming this function is mocked and not tested currently. |
Yeah, this is currently mocked in other tests. I think it should be fine to leave this one without tests since it's the same approach of checking directories we're already using in other manager integrations. |
Poking around another file, I noticed that there is another instance where mise is checked in a specific path. Likely should be updated as well. Lines 411 to 421 in 896617a
|
de53091
to
3314997
Compare
Yeah, we need to refactor that manager detection logic at some point. Each version manager integration should have some function that will return true if it's detect to be installed and then we don't need to duplicate the logic. For now, feel free to duplicate it. |
The installation path of Mise differs through the installation method chosen. Using Homebrew results in a path under `/opt/homebrew` where as the installation method from the Mise website is typically under `$HOME/.local`.
3314997
to
cefcb3c
Compare
mise
binarymise
binary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution!
Motivation
The installation path of Mise differs through the installation method chosen. Using Homebrew results in a path under
/opt/homebrew
where as the installation method from the Mise website is typically under$HOME/.local
.Implementation
When a custom mise path is not defined, 2 potential installation locations are tried instead.
Automated Tests
Skipping for now per discussion in PR.
Manual Tests
Extension manually started and observed Mise path of
/opt/homebrew
detected in logs.Closes #2878