Closed Rush closed 3 years ago
Can't reproduce. Works as expected here.
You shouldn't set universal variables in your config.fish
, they are meant to be set interactively.
Do you happen to be using both nvm-sh/nvm and nvm.fish? You shouldn't do that. Use one or the other.
Do you happen to be using both nvm-sh/nvm and nvm.fish? You shouldn't do that. Use one or the other.
No I am not using nvm-sh/nvm
. I am still having this problem. Any tips on how I can debug what's happening? In what place in the code is nvm.fish actually activating the current node version?
Seems like what I need to happen is execute "nvm use 14" on every new shell instance.
... activating the current node version
You probably mean nvm_default_version
. That happens on every new shell here:
Thanks! It seems something it setting nvm_current_version
global to a wrong value prior to this code running ! set --query nvm_current_version
. I have grepped through my ~/.config/fish
to no avail.
Changing to always nvm use
regardless of nvm_current_version fixes it but I'm yet to solve the actual mystery
status is-interactive &&
set --query nvm_default_version &&
nvm use $nvm_default_version >/dev/null
You should set nvm_default_version
if you want to persist Node across sessions, not nvm_current_version
. If you are not setting nvm_current_version
, then it could be a bug in nvm.
My
$nvm_default_version
is set tov14.17.5
but NVM is starting with an older version. Please see the following log for details. It's driving me crazy so I would appreciate any help.