grunt-contrib-watch
grunt-contrib-watch copied to clipboard
Infinite loop when watch target does not exist
It seems that if I provide a specific target and that target does not exist in grunt config, then watch goes into an infinite loop:
Running "watch:joke" (watch) task
Waiting...Verifying property watch.joke.files exists in config...ERROR
>> Unable to process task.
Warning: Required config property "watch.joke.files" missing.
Running "watch:joke" (watch) task
Waiting...Verifying property watch.joke.files exists in config...ERROR
>> Unable to process task.
Warning: Required config property "watch.joke.files" missing.
Running "watch:joke" (watch) task
Waiting...Verifying property watch.joke.files exists in config...ERROR
>> Unable to process task.
Warning: Required config property "watch.joke.files" missing.
This does not seem to stop unless I kill the terminal tab. Sometimes Ctrl+C helps, sometimes not. In any case, I believe watch should simply exit once it encounters an error instead of keeping trying.
Yeah this one is pretty annoying when switching back-and-forth between branches :confused:
Yeah, for me (and another friend too), this not only loops and freezes the pain, it causes all of my applications to stop responding so I have to force restart the computer completely. I can't believe this hasn't gotten any attention at all in two years. This shouldn't be a difficult fix right? Just check if (!grunt.config.get('watch.' + this.target)) // return or log or call fail.fatal
right? (Off the top of my head . . . can't recall if that's exactly what you'd need.)
2015 issue still annoying people in 2017 :-\ .
i'm having the same issue...