Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If the task fails, newer-postrun:... never gets called #81

Open
guncha opened this issue May 29, 2015 · 4 comments
Open

If the task fails, newer-postrun:... never gets called #81

guncha opened this issue May 29, 2015 · 4 comments

Comments

@guncha
Copy link

guncha commented May 29, 2015

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.

@tschaub
Copy link
Owner

tschaub commented May 30, 2015

Can you provide an example that demonstrates a problem.

guncha added a commit to guncha/grunt-newer-conf-corruption that referenced this issue May 30, 2015
To reproduce tschaub/grunt-newer/issues/81:

0) npm install
1) grunt newer:coffee
2) grunt watch
3) add 'super' keyword to hello.coffee, this will break the build
4) fix hello.coffee by removing 'super'
5) touch world.coffee, newer:coffee doesn't see that it has changed
@guncha
Copy link
Author

guncha commented May 30, 2015

Just pushed a repo that demonstrates the problem. Instructions are in the commit message. Hope that helps.

@guncha
Copy link
Author

guncha commented Jun 5, 2015

@tschaub, did you manage to confirm it?

@terite
Copy link

terite commented Aug 14, 2015

I'm having this problem frequently in a similar build configuration, and can confirm that #80 fixes it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants