Only filter the package npm, not any package name contains 'npm'
This commit is contained in:
4
nvm.sh
4
nvm.sh
@@ -1658,11 +1658,11 @@ $NVM_LS_REMOTE_IOJS_OUTPUT" | command grep -v "N/A" | sed '/^$/d')"
|
|||||||
echo 'No system version of node or io.js detected.' >&2
|
echo 'No system version of node or io.js detected.' >&2
|
||||||
return 3
|
return 3
|
||||||
fi
|
fi
|
||||||
INSTALLS=$(nvm deactivate > /dev/null && npm list -g --depth=0 | command tail -n +2 | command grep -o -e ' [^@]*' | command cut -c 2- | command grep -v npm | command xargs)
|
INSTALLS=$(nvm deactivate > /dev/null && npm list -g --depth=0 | command tail -n +2 | command grep -o -e ' [^@]*' | command cut -c 2- | command grep -vx npm | command xargs)
|
||||||
else
|
else
|
||||||
local VERSION
|
local VERSION
|
||||||
VERSION="$(nvm_version "$PROVIDED_VERSION")"
|
VERSION="$(nvm_version "$PROVIDED_VERSION")"
|
||||||
INSTALLS=$(nvm use "$VERSION" > /dev/null && npm list -g --depth=0 | command tail -n +2 | command grep -o -e ' [^@]*' | command cut -c 2- | command grep -v npm | command xargs)
|
INSTALLS=$(nvm use "$VERSION" > /dev/null && npm list -g --depth=0 | command tail -n +2 | command grep -o -e ' [^@]*' | command cut -c 2- | command grep -vx npm | command xargs)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Copying global packages from $VERSION..."
|
echo "Copying global packages from $VERSION..."
|
||||||
|
|||||||
Reference in New Issue
Block a user