Closed dpensi closed 11 months ago
I've just confirmed the problem using Debian Bullseye Gnome with Balena Etcher installed. I've checked that the default application for web is set to Firefox.
I get the same issue with:
cargo doc --open
same here. Ubuntu 22.04 with installed Balena Etcher. Default app for web is Firefox. rustc Version 1.73
I used
cargo doc --open
I'm guessing there is an issue with your mime types associations:
https://wiki.debian.org/MimeTypesSupport
Maybe have a look at what mime types Balena Etcher claims support for? I think it's pretty unlikely that this is a rustup bug, though. We use opener::open_browser()
which just opens the app associated with .html files by default, and obeys the BROWSER
environment variable (which I'm guessing Balena Etcher does not set).
I'm guessing there is an issue with your mime types associations:
https://wiki.debian.org/MimeTypesSupport
Maybe have a look at what mime types Balena Etcher claims support for? I think it's pretty unlikely that this is a rustup bug, though. We use
opener::open_browser()
which just opens the app associated with .html files by default, and obeys theBROWSER
environment variable (which I'm guessing Balena Etcher does not set).
don't think so.
For example
npm run dev
for nuxt or in general npm/node.js opens a Firefox tab without any issue on that system. Just checked it again a minute ago.
Double clicking on a .html file in the file explorer opens Firefox, too.
So I think my associations should be okay.
okay, got it! @djc : you were right! it WAS a missconfigured .html association. But only for local .html. And the configuration in the Gnome settings were still showing "Firefox" as the standard. On a hunch I set the configuration to another browser, saved it and went back to "Firefox" -> cargo doc was working after that. Then I re-opened balena etcher and voila: same problem again. So definitely not a problem of rust... Thanks for the push in the right direction!
Basically, we'll execute xdg-open ~/.rustup/toolchains/stable-aarch64-apple-darwin/share/doc/rust/html/index.html
(likely with a different target, of course) if xdg-open
exists (which I'm guessing it does in your case?) or otherwise does some other stuff with sh -s
.
I'm going to close this for now, I don't think the problem is with rustup in this case.
Problem
Screencast from 03-29-2023 06:35:30 PM.webm
If balenaEtcher is installed the command
rustup doc
opens an instance of it instead of opening the docs as shown in the videoSteps
rustup doc
Possible Solution(s)
No response
Notes
Rustup version
Installed toolchains