Mac: fs.watch() not detecting changes to file from git operation #5039
Closed
Description
I am on Mac OS X 10.11.1 with node.js 4.1.1. I also tried with node.js 5.x:
Steps:
- create a folder with one file in it and enable git in that folder
- commit to
master
- create
other
branch, make some changes to the file and commit toother
branch - switch between the branches while checking the output of the following script:
var fs = require("fs");
var watcher = fs.watch('<path to file>');
watcher.on('change', function(eventtype) {
console.log(eventtype);
});
=> I get a rename
event for the first time I switch to the other
branch. After that, the events stop when switching branches.
Activity