-
Notifications
You must be signed in to change notification settings - Fork 179
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
Add support for ASDF_DIR environment variable #2695
Conversation
I have signed the CLA! |
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 PR. I understand the use case, but reading that variable from the process env is not going to work for every case.
If someone opens VS Code from the terminal with code .
, it will work because the editor will inherit the environment variables. But if someone opens from the app icon, then it will not inherit anything and the code will simply not work.
If ASDF can be installed in any arbitrary directory, then we should add a new setting for ASDF allowing people to configure where we look for it.
0dd6719
to
80808c7
Compare
Co-authored-by: Vinicius Stock <vinistock@users.noreply.github.com>
Co-authored-by: Vinicius Stock <vinistock@users.noreply.github.com>
cb403eb
to
ab5f2a6
Compare
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!
@vinistock I thank you. |
Motivation
To handle custom asdf vm installation paths.
Closes #2686
ASDF supports custom installation paths using the asdf_dir env var, and ruby-lsp should look for it as it already supports ASDF. Currently, it tries the default installation paths only.
Implementation
I check if the ASDF_DIR env var do exists, and if it did, I try to find if the asdf script. Otherwise, it will follow the actual behavior.
Automated Tests
Since I only check if an env var exists, and didn't change the actual workflow of the extension, the current test suit should cover it up.
Manual Tests