Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustup doc should deal with absent doc instead of silently failing #901

Closed
toastedcornflakes opened this issue Jan 5, 2017 · 6 comments · Fixed by #2116
Closed

rustup doc should deal with absent doc instead of silently failing #901

toastedcornflakes opened this issue Jan 5, 2017 · 6 comments · Fixed by #2116

Comments

@toastedcornflakes
Copy link

toastedcornflakes commented Jan 5, 2017

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 toastedcornflakes changed the title rustup should explain how to install the doc instead of silently failing rustup doc should deal with absent doc instead of silently failing Jan 5, 2017
@dgellow
Copy link

dgellow commented Jan 27, 2017

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

@Zteve
Copy link

Zteve commented Feb 9, 2017

+1

@RalfJung
Copy link
Member

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...

kinnison added a commit to kinnison/rustup that referenced this issue Nov 10, 2019
When the user runs `rustup doc` on a toolchain which doesn't
have the `rust-docs` component installed, we now report more
nicely that the user ought to try and install the component.

Fixes rust-lang#901

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
@kinnison
Copy link
Contributor

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

@toastedcornflakes
Copy link
Author

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

@kinnison
Copy link
Contributor

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants