rust-lang/rustup

rustup doc should deal with absent doc instead of silently failing

Closed this issue · 6 comments

On a new install of rustup, running rustup doc fails silently if the documentation is not installed: the browser does not open, and there is no error message.

Would it be OK to add an error message, or to automatically run rustup component add rust-docs ?

This is tangentially related to #891 — if the doc is installed by default, this issue would be moot.

@toastedcornflakes ah thank you for this issue! I was trying to understand why rustup doc --book doesn't seem to work.

Zteve commented

+1

It doesn't fail silently here, but it fails: When I do rustup doc, I get the following error:

Unable to run the command specified. The file or folder /home/r/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc/rust/html/index.html does not exist.

It is not at all obvious to me how to even install the docs. rustup help doc doesn't tell me. Seems like I will have to do some more googling...

I'd appreciate input on whether or not #2116 is sufficient

#2116 is what I had in mind when I raised this, thanks!

Thank you.