mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-05-10 22:31:51 +00:00
fix: "Unable to obtain node version." in git bash windows
$ nvm install-latest-npm Attempting to upgrade to the latest working version of npm... Unable to obtain node version.
This commit is contained in:
parent
9a28dbd394
commit
01bbb784a0
2
nvm.sh
2
nvm.sh
@ -1273,7 +1273,7 @@ nvm_ls_current() {
|
|||||||
nvm_add_iojs_prefix "$(iojs --version 2>/dev/null)"
|
nvm_add_iojs_prefix "$(iojs --version 2>/dev/null)"
|
||||||
elif nvm_tree_contains_path "${NVM_DIR}" "${NVM_LS_CURRENT_NODE_PATH}"; then
|
elif nvm_tree_contains_path "${NVM_DIR}" "${NVM_LS_CURRENT_NODE_PATH}"; then
|
||||||
local VERSION
|
local VERSION
|
||||||
VERSION="$(node --version 2>/dev/null)"
|
VERSION="$(command node --version 2>/dev/null)"
|
||||||
if [ "${VERSION}" = "v0.6.21-pre" ]; then
|
if [ "${VERSION}" = "v0.6.21-pre" ]; then
|
||||||
nvm_echo 'v0.6.21'
|
nvm_echo 'v0.6.21'
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user