asdf-vm / asdf

Extendable version manager with support for Ruby, Node.js, Elixir, Erlang & more
https://asdf-vm.com/
MIT License
21.99k stars 782 forks source link

bug: asdf ignores current version #1779

Closed segeda closed 1 month ago

segeda commented 1 month ago

Describe the Bug

I have set local version of nodejs, but if i run node -v it is system wide version

Steps to Reproduce

  1. asdf current nodejs -> nodejs 20.10.0 /Users/severa/Personal/project/.tool-versions
  2. node -v -> v22.8.0
  3. asdf list nodejs ->
    14.17.0
    14.17.6
    14.20.0
    18.14.2
    *20.10.0
    22.8.0

Expected Behaviour

node -v -> v20.10.0

Actual Behaviour

node -v -> v22.8.0

Environment

OS:
Darwin MacBook-Pro-M3-Pro.local 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:30 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6030 arm64

SHELL:
fish, version 3.7.1

BASH VERSION:
3.2.57(1)-release

ASDF VERSION:
v0.14.1

ASDF INTERNAL VARIABLES:
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=/Users/severa/.asdf
ASDF_DIR=/opt/homebrew/opt/asdf/libexec
ASDF_CONFIG_FILE=/Users/severa/.asdfrc

ASDF INSTALLED PLUGINS:
deno                         https://github.com/asdf-community/asdf-deno.git master 87442fe
elixir                       https://github.com/asdf-vm/asdf-elixir.git master 1693b35
erlang                       https://github.com/asdf-vm/asdf-erlang.git master 0d402e6
nodejs                       https://github.com/asdf-vm/asdf-nodejs.git master f9957f3

asdf plugins affected (if relevant)

nodejs

segeda commented 1 month ago

I use fish-shell and this configuration

if status is-interactive
    # Commands to run in interactive sessions can go here
end

eval "$(/opt/homebrew/bin/brew shellenv)"
source /opt/homebrew/opt/asdf/libexec/asdf.fish

fzf --fish | source