From f8054d5cae2c576ac9df46908f65cf7491665386 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Sun, 14 Sep 2014 16:04:25 -0700 Subject: [PATCH] copy-packages: ensure that `nvm_version` is also applied to compare the provided version to the current one. --- nvm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index 678ab64..982994f 100644 --- a/nvm.sh +++ b/nvm.sh @@ -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