forked from extern/nushell
Fix watch not detecting modifications on Windows (#10109)
Closes #9910 FOR REAL this time. I had fixed the issue on Linux but not Windows. Context: https://github.com/nushell/nushell/issues/9910#issuecomment-1689308886 I've tested this PR successfully on Windows, Linux, and macOS by running `watch . {|a,b| print $a; print $b}` and confirming that it prints once when I change a file in the current directory.
This commit is contained in:
parent
af82eeca72
commit
c8a07d477f
@ -252,7 +252,8 @@ impl Command for Watch {
|
||||
.map(|path| event_handler("Remove", path, None))
|
||||
.unwrap_or(Ok(())),
|
||||
EventKind::Modify(ModifyKind::Data(DataChange::Content))
|
||||
| EventKind::Modify(ModifyKind::Data(DataChange::Any)) => one_event
|
||||
| EventKind::Modify(ModifyKind::Data(DataChange::Any))
|
||||
| EventKind::Modify(ModifyKind::Any) => one_event
|
||||
.paths
|
||||
.pop()
|
||||
.map(|path| event_handler("Write", path, None))
|
||||
|
Loading…
Reference in New Issue
Block a user