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 46c64a5 commit 860ea30
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use anyhow::{Context, Result};
use anyhow::{bail, Context, Result};
use camino::Utf8PathBuf;
use ignore::{overrides::OverrideBuilder, WalkBuilder};
use log::*;
use mdbook::{
book::{Book, Chapter},
errors::Result as MdbookResult,
Expand All @@ -12,8 +14,6 @@ use serde::Deserialize;
use std::collections::BTreeMap;
use toml::value::Value;
use uuid::Uuid;
use ignore::{overrides::OverrideBuilder, WalkBuilder};
use log::*;

/// Configuration for an invocation of files
#[derive(Deserialize, Debug)]
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 860ea30

Please sign in to comment.