Skip to content

Bug Report: fs.promises.watch() emits change before file is saved #4559

Answered by bnoordhuis
fuad303 asked this question in Q&A
Discussion options

You must be logged in to vote

Converted to a discussion because what you're seeing is not a bug, just a quirk or maybe a mismatched expectation. Your editor saves the file in multiple discrete steps and node1 picks up and reports the first one.

1 Not really node either; the event is reported by the operating system - i.e., the canonical source of truth - to node, which then passes it on to you.

Replies: 0 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by avivkeller
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants