nvm: Unable to upgrade manually according to doc
Tried the following from your docs to upgrade nvm manually
(
cd "$NVM_DIR"
git fetch origin
git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" origin`
) && \. "$NVM_DIR/nvm.sh"
but that prints me a git error:
┌─( /Users/michael-heuberger/.nvm 7ad6d98
cd "$NVM_DIR"
git fetch origin
git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" origin`
) && \. "$NVM_DIR/nvm.sh"
CONTRIBUTING.md LICENSE.md README.md alias bin nvm-exec package.json update_test_mocks.sh
Dockerfile Makefile ROADMAP.md bash_completion install.sh nvm.sh test versions
fatal: Not a valid object name origin
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 20 (14 by maintainers)
Commits related to this issue
- [Doc] Fix manual install & upgrade guide, fix #1772 — committed to PeterDaveHello/nvm by PeterDaveHello 6 years ago
- [Doc] Fix manual install & upgrade guide, fix #1772 — committed to PeterDaveHello/nvm by PeterDaveHello 6 years ago
- [Doc] Fix manual install & upgrade guide, fix #1772 — committed to PeterDaveHello/nvm by PeterDaveHello 6 years ago
nope, on git
1.8.3.1
runninggit fetch
beforehand changes nothing. also, the current upgrade script already doesgit fetch
anyway. it appears to be thatgit fetch
in my context doesn’t actually pull down tags, so it always thinks it’s at the latest version? some insight: https://stackoverflow.com/questions/1204190/does-git-fetch-tags-include-git-fetchupdate 1
through some testing on my own box (completely remove
.nvm
, reinstall0.33.9
fresh, run manual upgrade script with customgit fetch
) it appears I’ve got something that works.the key detail being the
--tags
flag togit fetch
. given the way that nvm is currently tagged, it seems that simply adding--tags
is sufficient to get oldergit
to detect the updated tag list, and thus allow upgrades. submitting a pr shortly, but feel free to contend it if I’m wrong!update 2
https://github.com/creationix/nvm/pull/1793
Well crap, i thought that might do it.
I’m still not sure what’s going on; I’ll think more on it.
same here