You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Install some tool using some other way (not through asdf)
Run the tool. At this point bash will hash the full path to the executable (so that next time it will avoid searching $PATH)
Install another version of the tool using asdf
Set the version you want to use, e.g. asdf global <tool> x.y.z
Run the tool.
Expected behavior
I would expect asdf shim to take over and execute the global version I've configured.
Actual behavior
Bash just takes the hashed executable path of the original tool, bypassing our shim. You can confirm this by running:
$ type<tool><tool> is hashed (/snap/bin/<tool>)
Environment
OS: Linux / Windows
asdf version:
0.6.3
Most other version managers clear hashes after installing a new version of the tool, e.g. you can see pyenv does it here.
It's simply a matter of running hash -r (for bash, at least) after the installation is complete. This can easily puzzle users who are not familiar with executable path hashing in bash.
P.S. Here is a nice stackoverflow answer explaining path hashing in bash.
The text was updated successfully, but these errors were encountered:
Steps to reproduce
asdf
)$PATH
)asdf
asdf global <tool> x.y.z
Expected behavior
I would expect asdf shim to take over and execute the global version I've configured.
Actual behavior
Bash just takes the hashed executable path of the original tool, bypassing our shim. You can confirm this by running:
Environment
OS: Linux / Windows
asdf version:
0.6.3
Most other version managers clear hashes after installing a new version of the tool, e.g. you can see
pyenv
does it here.It's simply a matter of running
hash -r
(for bash, at least) after the installation is complete. This can easily puzzle users who are not familiar with executable path hashing in bash.P.S. Here is a nice stackoverflow answer explaining path hashing in bash.
The text was updated successfully, but these errors were encountered: