Skip to content

Commit

Permalink
Fail with error on missing files
Browse files Browse the repository at this point in the history
  • Loading branch information
xfbs committed Dec 29, 2023
1 parent e2b7ad7 commit 61ecac7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use anyhow::{Context, Result};
use anyhow::{Context, Result, bail};
use camino::Utf8PathBuf;
use mdbook::{
book::{Book, Chapter},
Expand Down Expand Up @@ -157,6 +157,9 @@ impl Config {
}

info!("Found {} matching files", paths.len());
if paths.is_empty() {
bail!("No files matched");
}

let mut events = vec![];

Expand Down

0 comments on commit 61ecac7

Please sign in to comment.