Problem
When I invoke
cargo doc --open
on Ubuntu 18.04 with Chromium and Firefox available, the command decides to open VSCode instead of either of those browsers. Even when Chromium is running, VSCode is opened.
Steps
chromium-browser
and firefox
cargo doc --open
Not sure what else might be required to get a 100% reproduction.
Possible Solution(s)
I presume this stems from VSCode being an Electron app (right?) and Cargo somehow detects this as a browser or something?
Notes
Output of cargo version
: cargo 1.38.0 (23ef9a4ef 2019-08-20)
Cargo just calls xdg-open <path_to_index.html>
via https://docs.rs/opener/0.4.0/opener/.
I see, will try and see if my system is messed up in this regard.
EDIT:
Aight it seems like I found the issue:
[2001] 23:13:08 ojrask@ojrask-ubuntu:~/.local/share/applications
$ cat mimeapps.list
[Default Applications]
text/html=code-url-handler.desktop
x-scheme-handler/http=chromium-browser.desktop
x-scheme-handler/https=chromium-browser.desktop
x-scheme-handler/about=chromium-browser.desktop
x-scheme-handler/unknown=chromium-browser.desktop
x-scheme-handler/vscode=code-url-handler.desktop
Will fix this, sorry for noise!
For reference, this issue was fixed with
$ xdg-mime default chromium-browser.desktop text/html
Most helpful comment
For reference, this issue was fixed with