jorgebucaran / nvm.fish

The Node.js version manager you'll adore, crafted just for Fish
https://git.io/nvm.fish
MIT License
2.08k stars 69 forks source link

nvm install seemingly broken #167

Closed codingismy11to7 closed 2 years ago

codingismy11to7 commented 2 years ago

I'm not an expert so forgive me, my fish version is 3.3.1, nvm version is 2.2.6. On an intel mac.

I tried many different ways to install node 12.22.7, and eventually ended up debugging nvm install v12.22.7. It seems like the line

string match --entire --regex -- (_nvm_version_match $v) <$nvm_data/.index | read v alias

changes the value of $v from v12.22.7 to v12.22.7 lts/erbium. Then this value is used in the $url variable later on, ending up with a URL which doesn't exist.

jorgebucaran commented 2 years ago

Hmm, I am on an Intel mac and unable to reproduce it.

read v alias will save the Node version and alias into their respective variables, e.g.:

echo a b | read v alias
printf "%s\n" $v $alias
a
b
codingismy11to7 commented 2 years ago

thanks for checking, must be something in my environment, somehow

jorgebucaran commented 2 years ago

Could you check if the code using read that I posted above produces the indicated output?

codingismy11to7 commented 2 years ago

well I saw that both were definitely being added to v. this was on my work computer, I can check on Monday

codingismy11to7 commented 2 years ago
user@machine /tmp> echo a b | read v alias
user@machine /tmp> echo $alias

user@machine /tmp> echo $v
a b
user@machine /tmp> printf "%s\n" $v $alias
a b

user@machine /tmp> 

actually right as I was pasting this I realized it was probably my $IFS variable, so I set it to " " and then got the expected output

jorgebucaran commented 2 years ago

Seems like we forgot to close here.