Skip to content

Commit

Permalink
Merge pull request rust-lang#1284 from ericonr/opt
Browse files Browse the repository at this point in the history
Mention that uninstalled backend isn't marked optional.
  • Loading branch information
ehuss authored Jul 31, 2020
2 parents 4947e60 + d3bdb50 commit 0ca96c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion book-example/src/for_developers/backends.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,9 @@ the usual `RUST_LOG` to control logging verbosity.
If you enable a backend that isn't installed, the default behavior is to throw an error:

```text
The command wasn't found, is the "wordcount" backend installed?
The command `mdbook-wordcount` wasn't found, is the "wordcount" backend installed?
If you want to ignore this error when the "wordcount" backend is not installed,
set `optional = true` in the `[output.wordcount]` section of the book.toml configuration file.
```

This behavior can be changed by marking the backend as optional.
Expand Down
4 changes: 3 additions & 1 deletion src/renderer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ impl CmdRenderer {
return Ok(());
} else {
error!(
"The command `{}` wasn't found, is the `{}` backend installed?",
"The command `{0}` wasn't found, is the \"{1}\" backend installed? \
If you want to ignore this error when the \"{1}\" backend is not installed, \
set `optional = true` in the `[output.{1}]` section of the book.toml configuration file.",
self.cmd, self.name
);
}
Expand Down

0 comments on commit 0ca96c5

Please sign in to comment.