Merge pull request #2983 from ehuss/serve-bad-html-config

serve: Fix repeated error message when HTML config is invalid
This commit is contained in:
Eric Huss 2025-12-11 19:39:16 +00:00 committed by GitHub
commit 97747621aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -41,7 +41,6 @@ pub fn rebuild_on_change(
loop { loop {
std::thread::sleep(Duration::new(1, 0)); std::thread::sleep(Duration::new(1, 0));
watcher.set_roots(&book);
let start = Instant::now(); let start = Instant::now();
let paths = watcher.scan(); let paths = watcher.scan();
let elapsed = start.elapsed().as_secs_f64(); let elapsed = start.elapsed().as_secs_f64();
@ -67,6 +66,7 @@ pub fn rebuild_on_change(
post_build(); post_build();
} }
book = b; book = b;
watcher.set_roots(&book);
} }
Err(e) => error!("failed to load book config: {e:?}"), Err(e) => error!("failed to load book config: {e:?}"),
} }