diff --git a/install.sh b/install.sh index 3ae0bd31..0b69d205 100755 --- a/install.sh +++ b/install.sh @@ -157,7 +157,7 @@ install_nvm_from_git() { NVM_VERSION="${NVM_INSTALL_VERSION:-$(nvm_latest_version)}" if [ -n "${NVM_INSTALL_VERSION:-}" ]; then # Check if version is an existing ref - if command git ls-remote "$(nvm_source "git")" "$NVM_VERSION" | nvm_grep -q "$NVM_VERSION" ; then + if command git ls-remote "$(nvm_source "git")" "$NVM_VERSION" | nvm_grep -q -e "$NVM_VERSION" ; then : # Check if version is an existing changeset elif ! nvm_download -o /dev/null "$(nvm_source "script-nvm-exec")"; then diff --git a/nvm.sh b/nvm.sh index 6b547fb6..db84d5ac 100755 --- a/nvm.sh +++ b/nvm.sh @@ -4741,7 +4741,7 @@ nvm() { nvm_echo "${NVM_SUCCESS_MSG}" # rm any aliases that point to uninstalled version. - for ALIAS in $(nvm_grep -l "${VERSION}" "$(nvm_alias_path)"/* 2>/dev/null); do + for ALIAS in $(nvm_grep -l -e "${VERSION}" "$(nvm_alias_path)"/* 2>/dev/null); do nvm unalias "$(command basename "${ALIAS}")" done ;;