From f9e08fc34f1925e1176f8e6a64003e713e08db11 Mon Sep 17 00:00:00 2001 From: Kiril Videlov Date: Fri, 8 Nov 2024 18:14:37 +0100 Subject: [PATCH] feat(filewatcher): Debug logging on removed dir Adds debug logging when setting up file watching fails due to the directory no longer existing --- crates/turborepo-filewatch/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/turborepo-filewatch/src/lib.rs b/crates/turborepo-filewatch/src/lib.rs index 201031e96672e..24da7a61a25e4 100644 --- a/crates/turborepo-filewatch/src/lib.rs +++ b/crates/turborepo-filewatch/src/lib.rs @@ -272,8 +272,9 @@ async fn watch_events( for new_path in &event.paths { if let Err(err) = manually_add_recursive_watches(new_path, &mut watcher, Some(&broadcast_sender)) { match err { - WatchError::WalkDir(_) => { + WatchError::WalkDir(err) => { // Likely the path no longer exists + debug!("encountered error watching filesystem {}", err); continue; }, _ => {