Closed NoelBaron closed 6 years ago
I tried opening a file in three different editors (including Text Edit). Each time the file was opened, watch task triggered as if the file changed. Any ideas?
Same problem with these versions:
"devDependencies": {
"grunt": "^1.0.2",
"grunt-contrib-less": "^1.4.1",
"grunt-contrib-uglify": "^3.3.0",
"grunt-contrib-watch": "^1.0.0",
"grunt-env": "^0.4.4",
"grunt-express-server": "^0.5.3"
}
See the comment here: https://github.com/gruntjs/grunt/issues/1626#issuecomment-368932870
I bet it's creating lock files that the watch task is listening to. As this task only gets an event if a file is added, changed or deleted. I can't detect when files are opened by an IDE/text editor.
@shama This is what I see. I'm using */.js patterns.
That one happens when the IDE opens with files already listed. It also happens if TextEdit opens the file, or any other application. I'm thinking maybe its a .DS_Store file or something OSX specific, but I can't nail it down :(
@shama
@shama Can we reopen this? I asked on Stack Overflow and we agree it looks like this is happening on High Sierra. Were you able to test for this bug on High Sierra?
I'm on high sierra. I don't consider this a bug with grunt-contrib-watch but if you can provide a repro that shows it is in fact a bug with this task I'll reopen.
This isn't something I can debug for you. It's highly likely your editor and/or environment. Maybe dropbox is running or some other process on your machine that is touching files. I'm not sure, it doesn't happen for me.
Watch tasks are triggering any time I open a file in my IDE. I'm using CODA 2 (PANIC), with the following: