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

Create output dir in rustdoc markdown render #70448

Merged
merged 1 commit into from
Mar 28, 2020

Conversation

TimotheeGerber
Copy link
Contributor

rustdoc command on a standalone markdown document fails because the output directory (which default to doc/) is not created, even when specified with the --output argument.

This PR adds the creation of the output directory before the file creation to avoid an unexpected error which is unclear.

I am not sure about the returned error code. I did not find a table explaining them. So I simply put the same error code that is returned when File::create fails because they are both related to file-system errors.

Resolve #70431

@Dylan-DPC-zz
Copy link

r? @GuillaumeGomez

@GuillaumeGomez
Copy link
Member

No, you did great. There isn't really a rule about them, which isn't great. Thanks for this PR!

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Mar 28, 2020

📌 Commit 6a744ea has been approved by GuillaumeGomez

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Mar 28, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 28, 2020
Rollup of 5 pull requests

Successful merges:

 - rust-lang#70418 (Add long error explanation for E0703)
 - rust-lang#70448 (Create output dir in rustdoc markdown render)
 - rust-lang#70486 (Shrink Unicode tables (even more))
 - rust-lang#70493 (Fix rustdoc.css CSS tab-size property)
 - rust-lang#70495 (Replace last mention of IRC with Discord)

Failed merges:

r? @ghost
@bors bors merged commit bbd3634 into rust-lang:master Mar 28, 2020
@TimotheeGerber TimotheeGerber deleted the rustdoc-create-output-dir branch March 28, 2020 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rustdoc on a standalone markdown file fails with an unclear error message
5 participants