We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d450544 + e00b883 commit 4614a36Copy full SHA for 4614a36
src/cmd/watch.rs
@@ -130,11 +130,16 @@ where
130
let _ = watcher.watch(&book.root.join("book.toml"), NonRecursive);
131
132
for dir in &book.config.build.extra_watch_dirs {
133
- let path = dir.canonicalize().unwrap();
134
- if let Err(e) = watcher.watch(&path, Recursive) {
+ let path = book.root.join(dir);
+ let canonical_path = path.canonicalize().unwrap_or_else(|e| {
135
+ error!("Error while watching extra directory {path:?}:\n {e}");
136
+ std::process::exit(1);
137
+ });
138
+
139
+ if let Err(e) = watcher.watch(&canonical_path, Recursive) {
140
error!(
141
"Error while watching extra directory {:?}:\n {:?}",
- path, e
142
+ canonical_path, e
143
);
144
std::process::exit(1);
145
}
0 commit comments