Skip to content

Bad output.html config deserialization causes a loop while serving #2946

@ehuss

Description

@ehuss

Problem

When serving a book, and modifying book.toml to include something invalid, like:

[book]
title = "x"

[output.html]
foo = 123

the serve ends up printing the following every second:

ERROR Failed to deserialize `output.html`
	Caused by: unknown field `foo`, expected one of `theme`, `default-theme`, `preferred-dark-theme`, `smart-punctuation`, `definition-lists`, `admonitions`, `mathjax-support`, `additional-css`, `additional-js`, `fold`, `playground`, `playpen`, `code`, `print`, `no-section-label`, `search`, `git-repository-url`, `git-repository-icon`, `input-404`, `site-url`, `cname`, `edit-url-template`, `live-reload-endpoint`, `redirect`, `hash-files`, `sidebar-header-nav`

It probably should only do that once.

Steps

  1. Create a book
  2. mdbook serve
  3. Modify book.toml to have an invalid output.html table.

Possible Solution(s)

No response

Notes

mdbook v0.5.0

Version


Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: A bug, incorrect or unintended behaviorCommand-serveCommand: serve

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions