lukechilds / zsh-nvm

Zsh plugin for installing, updating and loading nvm
MIT License
2.24k stars 113 forks source link

Fatal error during `nvm upgrade` #27

Closed snowinferno closed 7 years ago

snowinferno commented 7 years ago

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
lukechilds commented 7 years ago

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.

snowinferno commented 7 years ago

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.

snowinferno commented 7 years ago

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 :1st_place_medal: