diff options
| -rw-r--r-- | CHANGELOG.md | 1 | ||||
| -rwxr-xr-x | dist-assets/pkg-scripts/postinstall | 6 | ||||
| -rwxr-xr-x | dist-assets/uninstall_macos.sh | 4 |
3 files changed, 8 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 1cba056475..1f02e8f16c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ Line wrap the file at 100 chars. Th ### Changed #### macOS - Use a local DNS resolver on the 127.0.0.0/8 network, regardless of macOS version. +- Install zsh completions in `/opt/homebrew` if available. ### Fixed #### macOS 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/" diff --git a/dist-assets/uninstall_macos.sh b/dist-assets/uninstall_macos.sh index 0983ee43ae..085885f836 100755 --- a/dist-assets/uninstall_macos.sh +++ b/dist-assets/uninstall_macos.sh @@ -36,10 +36,10 @@ sudo /Applications/Mullvad\ VPN.app/Contents/Resources/mullvad-setup reset-firew sudo /Applications/Mullvad\ VPN.app/Contents/Resources/mullvad-setup remove-device || echo "Failed to remove device from account" echo "Removing zsh shell completion symlink ..." -sudo rm -f /usr/local/share/zsh/site-functions/_mullvad +sudo rm -f "/opt/homebrew/share/zsh/site-functions/_mullvad" +sudo rm -f "/usr/local/share/zsh/site-functions/_mullvad" echo "Removing fish shell completion symlink ..." - sudo rm -f "/opt/homebrew/share/fish/vendor_completions.d/mullvad.fish" sudo rm -f "/usr/local/share/fish/vendor_completions.d/mullvad.fish" |
