Stop error "permission denied: /npm_completion" (#6340)

Fixes #5874

Related:
https://github.com/lukechilds/zsh-nvm/issues/23
https://github.com/zsh-users/antigen/issues/586
This commit is contained in:
Alexandre Nicastro 2018-07-01 18:21:20 -03:00 committed by Marc Cornellà
parent 5c0911c184
commit af085542bd

View File

@ -1,5 +1,5 @@
(( $+commands[npm] )) && { (( $+commands[npm] )) && {
__NPM_COMPLETION_FILE="${ZSH_CACHE_DIR}/npm_completion" __NPM_COMPLETION_FILE="${ZSH_CACHE_DIR:-$ZSH/cache}/npm_completion"
if [[ ! -f $__NPM_COMPLETION_FILE ]]; then if [[ ! -f $__NPM_COMPLETION_FILE ]]; then
npm completion >! $__NPM_COMPLETION_FILE 2>/dev/null npm completion >! $__NPM_COMPLETION_FILE 2>/dev/null