Skip to content

Rendering failed when book directory contains broken symlink #1396

@soareschen

Description

@soareschen

When the book src directory contains broken symlink, mdbook will fail to build the book with obscure error message No such file or directory.

Steps to reproduce:

  • Create a broken symlink in the book src directory, e.g. ln -s /path/not-found.

  • Running mdbook will produce the following error:

$ mdbook build
[INFO] (mdbook::book): Book building has started
[INFO] (mdbook::book): Running the html backend
[ERROR] (mdbook::utils): Error: Rendering failed
[ERROR] (mdbook::utils):    Caused By: No such file or directory (os error 2)

As shown above, the error message does not give any clue that the error is caused by broken symlink, making it difficult to debug.

Tested with mdbook v0.4.4 on Linux.

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-EasyExperience: Easy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions