Skip to content

Commit

Permalink
fix: skip optional env._.file files (#3381)
Browse files Browse the repository at this point in the history
Fixes #1777
  • Loading branch information
jdx authored Dec 6, 2024
1 parent 83da7f2 commit 77d75f0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/hook_env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ pub fn build_watches(
) -> Result<HookEnvWatches> {
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 {
Expand Down

0 comments on commit 77d75f0

Please sign in to comment.