grunt-contrib-watch icon indicating copy to clipboard operation
grunt-contrib-watch copied to clipboard

"spawn: false" doesn't work

Open Lalem001 opened this issue 6 years ago • 0 comments

I cannot get spawn: false to actually work in the current version of grunt-contrib-watch. When a watched file changes, the current watch task will end, and then a new watch will begin immediately. The tasks that I wanted to run never run.

Simplest example I can reliably demonstrate is to have a watch run grunt-eslint, or grunt-karma, on a js file.

I have found that if I insert grunt.task.clearQueue() before grunt.task.run(self.tasks) (taskrun.js#L65) the tasks will execute as expected.

I am wondering if there are any caveats to this potential fix that I may be missing. Should I go ahead and open a PR?

Lalem001 avatar Oct 08 '18 20:10 Lalem001