Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/book/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ impl MDBook {
// Index Preprocessor is disabled so that chapter paths continue to point to the
// actual markdown files.

let mut failed = false;
for item in book.iter() {
if let BookItem::Chapter(ref ch) = *item {
let chapter_path = match ch.path {
Expand Down Expand Up @@ -282,7 +283,8 @@ impl MDBook {
let output = cmd.output()?;

if !output.status.success() {
bail!(
failed = true;
error!(
"rustdoc returned an error:\n\
\n--- stdout\n{}\n--- stderr\n{}",
String::from_utf8_lossy(&output.stdout),
Expand All @@ -291,6 +293,9 @@ impl MDBook {
}
}
}
if failed {
bail!("One or more tests failed");
}
Ok(())
}

Expand Down