jorgebucaran / nvm.fish

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

`nvm list` command throws, when no existing installation found #228

Closed phoenisx closed 1 month ago

phoenisx commented 1 month ago

Hi

I was using omf before and recently switched to fisher. I thought nvm list using fisher nvm plugin would list my previous installation, but it didn't and threw the following error:

~/.config/fish/functions/_nvm_list.fish (line 1): No matches for wildcard '$nvm_data/*'. See `help wildcards-globbing`.
string replace --all -- $nvm_data/ "" $nvm_data/*
                                      ^~~~~~~~~~^
in command substitution
        called on line 2 of file ~/.config/fish/functions/_nvm_list.fish
in function '_nvm_list'
        called on line 179 of file ~/.config/fish/functions/nvm.fish
in function 'nvm' with arguments 'list'
~/.config/fish/functions/_nvm_list.fish (line 2): Unmatched wildcard
    set --local versions (string replace --all -- $nvm_data/ "" $nvm_data/*)
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
in function '_nvm_list'
        called on line 179 of file ~/.config/fish/functions/nvm.fish
in function 'nvm' with arguments 'list'

I deleted my previous node installations which were present inside ~/.nvm, and ran nvm install latest to reinstall node which worked and post that the above error went away.

The concern here is the error above made me a little confused at first

jorgebucaran commented 1 month ago

Should be good now! Thanks.