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

rustdoc: auto create output directory when "--output-format json" #93099

Merged
merged 1 commit into from
Jan 21, 2022

Commits on Jan 20, 2022

  1. rustdoc: auto create output directory when "--output-format json"

    This PR allows rustdoc to automatically create output directory in case
    it does not exist (when run with `--output-format json`).
    
    This fixes rustdoc crash:
    
    ````
    $ rustdoc --output-format json -Z unstable-options src/main.rs
    error: couldn't generate documentation: No such file or directory (os error 2)
      |
      = note: failed to create or modify "doc/main.json"
    
    error: aborting due to previous error
    ````
    
    With this fix behavior of `rustdoc --output-format json` becomes consistent
    with `rustdoc --output-format html` (which already auto-creates output
    directory if it's missing)
    tomkris committed Jan 20, 2022
    Configuration menu
    Copy the full SHA
    4e17170 View commit details
    Browse the repository at this point in the history