From 09f686f38de7538f6197cc583268061c8f94bbf8 Mon Sep 17 00:00:00 2001 From: Romain Bossart Date: Sun, 4 Apr 2021 21:50:31 +0200 Subject: [PATCH] fix _brew completion default cache path --- Library/Homebrew/completions/zsh.erb | 2 +- completions/zsh/_brew | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 ]] }