From e3d1519567fd5da88a66a5d131ebf6e884d87a81 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Mon, 4 Sep 2017 22:01:46 -0700 Subject: [PATCH] [Fix] `install-latest-npm`: `io.js` `v1.0.0` has weird behavior with npm v4.6.x. --- nvm.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nvm.sh b/nvm.sh index d0c09a3..7c3c596 100644 --- a/nvm.sh +++ b/nvm.sh @@ -199,8 +199,8 @@ nvm_install_latest_npm() { if [ $NVM_IS_0_9 -eq 1 ] || [ $NVM_IS_0_6 -eq 1 ]; then nvm_echo '* node v0.6 and v0.9 are unable to upgrade further' - elif nvm_version_greater 1.0.0 "${NODE_VERSION}"; then - nvm_echo '* `npm` v4.5.x is the last version that works on `node` versions below v1.0.0' + elif nvm_version_greater_than_or_equal_to 1.0.0 "${NODE_VERSION}"; then + nvm_echo '* `npm` v4.5.x is the last version that works on `node` versions <= v1.0.0' $NVM_NPM_CMD install -g npm@4.5 elif nvm_version_greater 4.0.0 "${NODE_VERSION}"; then nvm_echo '* `npm` v5 and higher do not work on `node` versions below v4.0.0'