diff --git a/Library/Homebrew/completions/zsh.erb b/Library/Homebrew/completions/zsh.erb index 2f401de7a1..87832e2483 100644 --- a/Library/Homebrew/completions/zsh.erb +++ b/Library/Homebrew/completions/zsh.erb @@ -44,7 +44,7 @@ __brew_completion_caching_policy() { (( $#tmp )) || return 0 # otherwise, invalidate if latest tap index file is missing or newer than cache file - tmp=( ${HOMEBREW_REPOSITORY:-/usr/local/Homebrew}/Library/Taps/*/*/.git/index(om[1]N) ) + tmp=( $(brew --repository)/Library/Taps/*/*/.git/index(om[1]N) ) [[ -z $tmp || $tmp -nt $1 ]] } diff --git a/completions/zsh/_brew b/completions/zsh/_brew index 30e5658dd0..a5f526aa54 100644 --- a/completions/zsh/_brew +++ b/completions/zsh/_brew @@ -47,7 +47,7 @@ __brew_completion_caching_policy() { (( $#tmp )) || return 0 # otherwise, invalidate if latest tap index file is missing or newer than cache file - tmp=( ${HOMEBREW_REPOSITORY:-/usr/local/Homebrew}/Library/Taps/*/*/.git/index(om[1]N) ) + tmp=( $(brew --repository)/Library/Taps/*/*/.git/index(om[1]N) ) [[ -z $tmp || $tmp -nt $1 ]] }