Skip to content

Commit

Permalink
fix: "Unable to obtain node version." in git bash windows
Browse files Browse the repository at this point in the history
$ nvm install-latest-npm
Attempting to upgrade to the latest working version of npm...
Unable to obtain node version.
  • Loading branch information
svihpinc authored Sep 2, 2024
1 parent 9a28dbd commit 01bbb78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 01bbb78

Please sign in to comment.