From f1121cf8c28370696e642b1a67f886a7b42fd50c Mon Sep 17 00:00:00 2001 From: Mathieu David Date: Sun, 4 Jun 2017 20:47:34 +0200 Subject: [PATCH] fix build failure --- src/bin/mdbook.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bin/mdbook.rs b/src/bin/mdbook.rs index 78387ba1..416aa081 100644 --- a/src/bin/mdbook.rs +++ b/src/bin/mdbook.rs @@ -358,7 +358,10 @@ fn trigger_on_change(book: &mut MDBook, closure: F) -> () }; // Add the theme directory to the watcher - watcher.watch(book.get_theme_path(), Recursive).unwrap_or_default(); + if let Some(t) = book.get_theme_path() { + watcher.watch(t, Recursive).unwrap_or_default(); + } + // Add the book.{json,toml} file to the watcher if it exists, because it's not // located in the source directory