copy-packages: ensure that `nvm_version` is also applied to compare the provided version to the current one.

master
Jordan Harband 2014-09-14 16:04:25 -07:00
parent ad2713b13a
commit f8054d5cae
1 changed files with 1 additions and 1 deletions

2
nvm.sh
View File

@ -796,7 +796,7 @@ nvm() {
local PROVIDED_VERSION
PROVIDED_VERSION="$2"
if [ "$PROVIDED_VERSION" = "$(nvm_ls_current)" ]; then
if [ "$PROVIDED_VERSION" = "$(nvm_ls_current)" ] || [ "$(nvm_version $PROVIDED_VERSION)" = "$(nvm_ls_current)" ]; then
echo 'Can not copy packages from the current version of node.' >&2
return 2
fi