Skip to content

Can't run mdbook build locally without installing or disabling linkcheck #2178

Description

@Zalathar

As of #2103:

$ mdbook build --open
2024-12-30 11:30:43 [INFO] (mdbook::book): Book building has started
2024-12-30 11:30:43 [INFO] (mdbook::book): Running the html backend
2024-12-30 11:30:44 [INFO] (mdbook::book): Running the linkcheck backend
2024-12-30 11:30:44 [INFO] (mdbook::renderer): Invoking the "linkcheck" renderer
Checking files changed in master...: 
exec mdbook-linkcheck2 -f 
/Users/stuart/Dev/rust/dev-guide/ci/linkcheck.sh: line 47: exec: mdbook-linkcheck2: not found
2024-12-30 11:30:44 [WARN] (mdbook::renderer): Error writing the RenderContext to the backend, Broken pipe (os error 32)
2024-12-30 11:30:44 [ERROR] (mdbook::renderer): Renderer exited with non-zero return code.
2024-12-30 11:30:44 [ERROR] (mdbook::utils): Error: Rendering failed
2024-12-30 11:30:44 [ERROR] (mdbook::utils): 	Caused By: The "linkcheck" renderer failed

Building the book now fails if mdbook-linkcheck2 has not been manually installed, even if the contributor doesn't care about linkcheck and just wants to build the book to preview their changes.

And while there is a workaround available, it isn't mentioned by the error message at all.


As a temporary workaround, this works:

$ SKIP_LINKCHECK=1 mdbook build

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions