From af085542bdc0e835093ed2b86f90251bc1f3d719 Mon Sep 17 00:00:00 2001 From: Alexandre Nicastro Date: Sun, 1 Jul 2018 18:21:20 -0300 Subject: [PATCH] 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 --- plugins/npm/npm.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/npm/npm.plugin.zsh b/plugins/npm/npm.plugin.zsh index 43af35ddb..f62174a4f 100644 --- a/plugins/npm/npm.plugin.zsh +++ b/plugins/npm/npm.plugin.zsh @@ -1,5 +1,5 @@ (( $+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 npm completion >! $__NPM_COMPLETION_FILE 2>/dev/null