From 94fff5c923b57d7d14a4bcf9e782223825f21ac7 Mon Sep 17 00:00:00 2001 From: Marcin Jekot Date: Sat, 14 Dec 2013 01:10:45 +0200 Subject: [PATCH] fix copy-packages in zsh (without breaking sh and bash) --- nvm.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nvm.sh b/nvm.sh index f59c99f..5c2cce5 100755 --- a/nvm.sh +++ b/nvm.sh @@ -486,8 +486,8 @@ nvm() { fi VERSION=`nvm_version $2` ROOT=`nvm use $VERSION && npm -g root` - INSTALLS=`nvm use $VERSION > /dev/null && npm -g -p ll | \grep "$ROOT\/[^/]\+$" | cut -d '/' -f 8 | cut -d ":" -f 2 | \grep -v npm | tr "\n" " "` - npm install -g $INSTALLS + INSTALLS=( `nvm use $VERSION > /dev/null && npm -g -p ll | \grep "$ROOT\/[^/]\+$" | cut -d '/' -f 8 | cut -d ":" -f 2 | \grep -v npm | tr "\n" " "` ) + npm install -g ${INSTALLS[@]} ;; "clear-cache" ) rm -f $NVM_DIR/v* 2>/dev/null