From 01bbb784a0e0d802518504f68a1d404042eb1f8a Mon Sep 17 00:00:00 2001 From: svihpinc <115612815+svihpinc@users.noreply.github.com> Date: Mon, 2 Sep 2024 18:14:52 +0530 Subject: [PATCH] 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. --- nvm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index d991ff0e13..641a3a78fb 100755 --- a/nvm.sh +++ b/nvm.sh @@ -1273,7 +1273,7 @@ nvm_ls_current() { nvm_add_iojs_prefix "$(iojs --version 2>/dev/null)" elif nvm_tree_contains_path "${NVM_DIR}" "${NVM_LS_CURRENT_NODE_PATH}"; then local VERSION - VERSION="$(node --version 2>/dev/null)" + VERSION="$(command node --version 2>/dev/null)" if [ "${VERSION}" = "v0.6.21-pre" ]; then nvm_echo 'v0.6.21' else