mullvad / mullvadvpn-app

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

Fish completions not installing #3323

Closed KnifeFed closed 1 week ago

KnifeFed commented 2 years ago

Issue report

Operating system: macOS 12.2

App version: 2021.6

Issue description

I'm on Apple Silicon and after installing Mullvad with Homebrew, fish completions are not working. Here's my $fish_complete_path:

$ set -S fish_complete_path
$fish_complete_path: set in global scope, unexported, with 6 elements
$fish_complete_path[1]: |/Users/<username>/.config/fish/completions|
$fish_complete_path[2]: |/opt/homebrew/Cellar/fish/3.3.1/etc/fish/completions|
$fish_complete_path[3]: |/opt/homebrew/Cellar/fish/3.3.1/share/fish/vendor_completions.d|
$fish_complete_path[4]: |/opt/homebrew/share/fish/vendor_completions.d|
$fish_complete_path[5]: |/opt/homebrew/Cellar/fish/3.3.1/share/fish/completions|
$fish_complete_path[6]: |/Users/<username>/.local/share/fish/generated_completions|

I see the install path is hardcoded in the postinstall script. If I manually add the file to ~/.config/fish/completions it works fine.

$ brew --config
HOMEBREW_VERSION: 3.3.13
ORIGIN: https://github.com/Homebrew/brew
HEAD: 2ae21a582a90571abb66b7fbceb04cd1e53785bf
Last commit: 5 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 391eaeb6f076586b16a806b7d53521471f184f13
Core tap last commit: 2 hours ago
Core tap branch: master
HOMEBREW_PREFIX: /opt/homebrew
HOMEBREW_CASK_OPTS: []
HOMEBREW_CORE_GIT_REMOTE: https://github.com/Homebrew/homebrew-core
HOMEBREW_EDITOR: code --new-window
HOMEBREW_GITHUB_API_TOKEN: set
HOMEBREW_MAKE_JOBS: 10
Homebrew Ruby: 2.6.8 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: 10-core 64-bit arm_firestorm_icestorm
Clang: 13.0.0 build 1300
Git: 2.35.1 => /opt/homebrew/bin/git
Curl: 7.77.0 => /usr/bin/curl
macOS: 12.2-arm64
CLT: 13.2.0.0.1.1638488800
Xcode: 13.2.1
Rosetta 2: false
faern commented 2 years ago

Interesting. I read now on homebrew's website that /opt/homebrew is where it lives on Apple Silicon Macs! We need to update the postinstall script to detect the homebrew path and install it correctly. Thanks for reporting this!

KnifeFed commented 2 years ago

Yeah, so the path should most likely be $(brew --prefix)/share/fish/vendor_completions.d/.

hulthe commented 1 week ago

I believe this issue is fixed since 2023.1