Set shell and env for ASDF activation #2006
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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