Our ASDF integration was broken for two main reasons: ASDF depends on the user's shell and on a bunch of environment variables to properly activate. This is why we had to set the data dir manually, when in fact ASDF should be detecting that automatically.
Note that we may still need to offer settings for users to override ASDF_DIR and ASDF_DATA_DIR manually since ASDF does allow that and we're not sourcing their ~/.zshrc or ~/.bashrc files.
Implementation
Started setting the shell to be vscode.env.shell, which should match what the user configured for VS Code's integrated terminal
Started passing the process.env so that ASDF can use $HOME, $PATH and all other environment variables it needs to figure things out
I verified on a Linux machine that this works without having to specify ASDF_DIR or ASDF_DATA_DIR and without having to modify the PATH to include the shims directory (since ASDF is doing that on its own).
Automated Tests
Updated the tests.
Manual Tests
Launch the extension in development mode on this branch
Ensure the version manager is configured to be ASDF
Ensure that the Ruby LSP server is launched properly using the expected Ruby version
Motivation
Closes #1999, closes #1997, closes #2048, closes #2023
It might also do it for #2027, #1517 and #2020
Our ASDF integration was broken for two main reasons: ASDF depends on the user's shell and on a bunch of environment variables to properly activate. This is why we had to set the data dir manually, when in fact ASDF should be detecting that automatically.
Note that we may still need to offer settings for users to override
ASDF_DIR
andASDF_DATA_DIR
manually since ASDF does allow that and we're not sourcing their~/.zshrc
or~/.bashrc
files.Implementation
shell
to bevscode.env.shell
, which should match what the user configured for VS Code's integrated terminalprocess.env
so that ASDF can use$HOME
,$PATH
and all other environment variables it needs to figure things outI verified on a Linux machine that this works without having to specify
ASDF_DIR
orASDF_DATA_DIR
and without having to modify thePATH
to include the shims directory (since ASDF is doing that on its own).Automated Tests
Updated the tests.
Manual Tests