-
Notifications
You must be signed in to change notification settings - Fork 910
Description
Describe the Bug
This is a reopening of #1955 (comment). Many of us are still experiencing this issue, where asdf is shimming things that it does not manage and causing a lot of headaches. There has been more discussion on that issue since it was closed, but I don't think maintainers are seeing it (because it's closed). So, I'm sorry to do this but this is effectively a "bump" on that issue.
This is related as well: #2138
Steps to Reproduce
User installs 2 versions of python using asdf-python plugin and sets the python version in a .tool-versions file.
The user then creates and activates a virtual environment. Using pip the user installs a package inside the virtual environment, which contains some executable that asdf shims. The user expects that the executable can be located when they are in the virtual environment:
$ (.venv) which myexecutable
...path/to/.venv/lib/site-packages/mypackage/myexecutable.bin
But upon deactivating the virtual environment, the user expects that the executable should not be found (no myexecutable in... etc). Instead, asdf` takes over:
$ which myexecutable
No version is set for command myexecutable
Consider adding one of the following versions in your config file at /path/to/.tool-versions
The user expects only python or nodejs etc to have this behavior with asdf, but it starts popping up all over their system.
Expected Behaviour
Do not shim packages that are not managed by asdf
Actual Behaviour
asdf shims packages that it should not shim
Environment
OS:
Darwin my-mac.local 23.5.0 Darwin Kernel Version 23.5.0: ...
x86_64
SHELL:
zsh 5.9 (x86_64-apple-darwin23.0)
ASDF:
version: v0.14.0-3a3a3a3
ASDF environment variables:
ASDF_DIR=/usr/local/opt/asdf
ASDF_DATA_DIR=/Users/you/.asdf
ASDF_CONFIG_FILE=/Users/you/.asdfrc
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=/Users/you/.tool-versions
ASDF_USER_SHIMS_DIR=/Users/you/.asdf/shims
ASDF_USER_BIN=/Users/you/.asdf/binasdf plugins affected (if relevant)
No response