mullvad / mullvadvpn-app

The Mullvad VPN client app for desktop and mobile
https://mullvad.net/
GNU General Public License v3.0
4.91k stars 335 forks source link

Uninstalling mullvad does not remove zsh shell completion symlink #6450

Open Moulick opened 2 months ago

Moulick commented 2 months ago

Is it a bug?

I have checked if others have reported this already

Current Behavior

The postinstall script in mullvad macos .pkg makes a symlink for zsh and fish shell completion. ln -sf "$INSTALL_DIR/Mullvad VPN.app/Contents/Resources/_mullvad" "$ZSH_COMPLETIONS_DIR/_mullvad" This symlink is not removed when uninstalling the app. This causes errors in compinit compinit:527: no such file or directory: /usr/local/share/zsh/site-functions/_mullvad

Expected Behavior

Uninstalling should remove zsh and fish shell completion symlink

Steps to Reproduce

  1. Install mullvad on MacOS
  2. Uninstall mullvad
  3. run rm -f ~/.zcompdump ~/.zcompdump.zwc
  4. run compinit

Failure Logs

compinit:527: no such file or directory: /usr/local/share/zsh/site-functions/_mullvad

Operating system version

MacOS 14.5

Mullvad VPN app version

Looking at the git history, it's been here since 4 years

Additional Information

https://github.com/mullvad/mullvadvpn-app/blame/966a56cb87744651f7716bdae2e590d34ecb03b0/dist-assets/pkg-scripts/postinstall#L101

TheNaman047 commented 1 week ago

Facing same issue. Any workaround to resolve this?

Moulick commented 1 week ago

@TheNaman047 Use the brew installation if you can, that will do the cleanup properly. You can see the linked PR above.

TheNaman047 commented 1 week ago

Yaa thanks, I checked the diff and removed the file from the path