Properly pass a space-separated list of packages to npm install

Fixes #490.
This commit is contained in:
Jordan Harband
2014-08-22 02:44:04 -07:00
parent 56c40cfa3c
commit 4b3d6f1760
2 changed files with 2 additions and 2 deletions

2
nvm.sh
View File

@@ -793,7 +793,7 @@ nvm() {
local INSTALLS
INSTALLS=$(nvm use $VERSION > /dev/null && npm list --global --parseable --depth=0 2> /dev/null | tail -n +2 | \grep -o -e '/[^/]*$' | cut -c 2- | \grep -v npm | xargs)
npm install -g --quiet $INSTALLS
echo "$INSTALLS" | xargs npm install -g --quiet
;;
"clear-cache" )
rm -f $NVM_DIR/v* "$(nvm_version_dir)" 2>/dev/null