Redirect stderr output from `npm ls -g` to /dev/null.

Fixes #756.
Jordan Harband 2015-08-03 16:41:47 -07:00
parent 1f679fc055
commit d7035c5e61
1 changed files with 2 additions and 2 deletions

4
nvm.sh
View File

@ -1149,9 +1149,9 @@ nvm_npm_global_modules() {
local VERSION
VERSION="$1"
if [ "_$VERSION" = "_system" ]; then
NPMLIST=$(nvm use system > /dev/null && npm list -g --depth=0 | command tail -n +2)
NPMLIST=$(nvm use system > /dev/null && npm list -g --depth=0 2> /dev/null | command tail -n +2)
else
NPMLIST=$(nvm use "$VERSION" > /dev/null && npm list -g --depth=0 | command tail -n +2)
NPMLIST=$(nvm use "$VERSION" > /dev/null && npm list -g --depth=0 2> /dev/null | command tail -n +2)
fi
local INSTALLS