Merge pull request #328 from naartjie/master
fix copy-packages in zsh (without breaking sh and bash). Closes #223, fixes #299.master
commit
ce7d2e7618
4
nvm.sh
4
nvm.sh
|
@ -487,8 +487,8 @@ nvm() {
|
|||
local VERSION=`nvm_version $2`
|
||||
local ROOT=`nvm use $VERSION && npm -g root`
|
||||
local ROOTDEPTH=$((`echo $ROOT | sed 's/[^\/]//g'|wc -m` -1))
|
||||
local INSTALLS=`nvm use $VERSION > /dev/null && npm -g -p ll | \grep "$ROOT\/[^/]\+$" | cut -d '/' -f $(($ROOTDEPTH + 2)) | cut -d ":" -f 2 | \grep -v npm | tr "\n" " "`
|
||||
npm install -g $INSTALLS
|
||||
local INSTALLS=( `nvm use $VERSION > /dev/null && npm -g -p ll | \grep "$ROOT\/[^/]\+$" | cut -d '/' -f $(($ROOTDEPTH + 2)) | cut -d ":" -f 2 | \grep -v npm | tr "\n" " "` )
|
||||
npm install -g ${INSTALLS[@]}
|
||||
;;
|
||||
"clear-cache" )
|
||||
rm -f $NVM_DIR/v* 2>/dev/null
|
||||
|
|
Loading…
Reference in New Issue