grunt-newer
grunt-newer copied to clipboard
If the task fails, newer-postrun:... never gets called
This was a fun one. On https://github.com/tschaub/grunt-newer/blob/master/tasks/newer.js#L133, when grunt-newer
asks for the tasks to be run, if the first task fails for whatever reason, newer-postrun
never gets run, the config is not restored and a lot of bad things happen.
For me it manifested as a multi target task stopped working via newer as the config was corrupted. This can be worked around using --force
command line option, but I don't know enough about grunt to make the necessary changes.
Can you provide an example that demonstrates a problem.
Just pushed a repo that demonstrates the problem. Instructions are in the commit message. Hope that helps.
@tschaub, did you manage to confirm it?
I'm having this problem frequently in a similar build configuration, and can confirm that https://github.com/tschaub/grunt-newer/pull/80 fixes it.