lukechilds/zsh-nvm

Fatal error during `nvm upgrade`

snowinferno opened this issue · 3 comments

I just discovered this plugin and decided to give it a go.
I seemed to have had nvm installed via homebrew, so uninstalled it.

I had had nvm 0.31.x installed, brew uninstalled it, and installed nvm fresh from nvm.sh, so I have 0.33.1installed now.

Whenever I run nvm upgrade I get the following output. This is the same output I have always gotten from the command regardless of nvm version, order of oh-my-zsh plugins, or whether it was installed from homebrew.

╰─➤  nvm upgrade
Installed version is v0.33.1
Checking latest version of nvm...
fatal: Not a valid object name origin
Updating to ...
warning: empty strings as pathspecs will be made invalid in upcoming releases. please use . instead if you meant to match all paths

Ahh, zsh-nvm requires nvm to be installed via git. That's how we do the updates. If you delete your nvm install ,zsh-nvm will automatically pull down the latest version for you via git and everything should work as expected.

I used their install script which appears to do a git clone into the .nvm directory.
Running part of the manual install (git describe --abbrev=0 --tags --match "v[0-9]*" origin) I get the same fatal: Not a valid object name origin message.

I'll try renaming the .nvm directory and see if the zsh-nvm automatically installed version has the same issue.

The version automatically installed by zsh-nvm is not having the issue.
Thanks for the advice! I'm surprised that the install-script version has issues as a git repo but that's not an issue for this project 🥇