diff --git a/src/hook_env.rs b/src/hook_env.rs index c4ef9f9962..78cbec5628 100644 --- a/src/hook_env.rs +++ b/src/hook_env.rs @@ -129,7 +129,9 @@ pub fn build_watches( ) -> Result { let mut max_modtime = UNIX_EPOCH; for cf in get_watch_files(watch_files) { - max_modtime = std::cmp::max(cf.metadata()?.modified()?, max_modtime); + if let Ok(Ok(modified)) = cf.metadata().map(|m| m.modified()) { + max_modtime = std::cmp::max(modified, max_modtime); + } } Ok(HookEnvWatches {