summaryrefslogtreecommitdiffhomepage
path: root/dist-assets/pkg-scripts
diff options
context:
space:
mode:
authorEric Knibbe <enk3@outlook.com>2025-06-06 15:53:53 -0400
committerMarkus Pettersson <markus.pettersson@mullvad.net>2025-06-19 16:32:07 +0200
commit875d18bfbcee198fe162673ca454e71cc98ac0b9 (patch)
treef6def9b228d23ea82274e1f0a30bc127a8bb9bcb /dist-assets/pkg-scripts
parent9f2acb70e2677cd8c3f7eeda56dec56c07f65ad4 (diff)
downloadmullvadvpn-875d18bfbcee198fe162673ca454e71cc98ac0b9.tar.xz
mullvadvpn-875d18bfbcee198fe162673ca454e71cc98ac0b9.zip
macOS: use `/opt/homebrew` for zsh completions if available
Diffstat (limited to 'dist-assets/pkg-scripts')
-rwxr-xr-xdist-assets/pkg-scripts/postinstall6
1 files changed, 5 insertions, 1 deletions
diff --git a/dist-assets/pkg-scripts/postinstall b/dist-assets/pkg-scripts/postinstall
index 6f6f6f9904..2c067efab1 100755
--- a/dist-assets/pkg-scripts/postinstall
+++ b/dist-assets/pkg-scripts/postinstall
@@ -62,7 +62,11 @@ DAEMON_PLIST=$(cat <<-EOM
EOM
)
-ZSH_COMPLETIONS_DIR="/usr/local/share/zsh/site-functions/"
+if [[ -d "/opt/homebrew/share/zsh/site-functions/" ]]; then
+ ZSH_COMPLETIONS_DIR="/opt/homebrew/share/zsh/site-functions/"
+else
+ ZSH_COMPLETIONS_DIR="/usr/local/share/zsh/site-functions/"
+fi
if [[ -d "/opt/homebrew/share/fish/vendor_completions.d/" ]]; then
FISH_COMPLETIONS_DIR="/opt/homebrew/share/fish/vendor_completions.d/"