-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Provide flag like --force to continue running subsequent tasks, even when a task errored #871
Comments
My idea was that the CLI flag would swap bach.series/parallel for the settle equivalents. This hasn't been implemented yet. |
@geekflyer can you take a look at the 4.0 branch and see if it achieves what you are looking for? I believe I have addressed the issue but I'm not sure of the ideal logging or the command-line flag. Let the bikeshedding commence. |
@phated Just tried it out and it seems pretty cool, thanks! The logging is fine and also it's good that it still returns a non-zero exit code if one of the tasks fails. I'll update my projects to it and use it in production a few days. |
@geekflyer much appreciated |
@geekflyer any more feedback on this? |
Marking this as done since it seems to work for everyone who requested it |
@phated The feature works fine on multiple machines - thanks again. Didn't notice any bugs. |
just for everyone who looks into this issue again. usage example: |
Hi,
I'm looking for the ability to continue running gulp tasks, even when some of them failed, similar to the
--force
option in grunt. In addition it would be nice If gulp would report a summary at the end, giving a list of tasks which failed and return a proper non zero exit code if there are some.Generally it appears the error handling / logging is a bit subpar at the moment (compared to grunt with it's multiple loglevels etc.).
I would be willing to code some stuff and send pull requests to improve this, though I wanted to discuss this here first. For me this a rather important topic as we use gulp a lot for running various types of tests (backend, ui unittest, ui integrationtests) and we don't want to skip all the other tests just because single test or jshint etc. failed. I know I can basically code most tasks in a way that errors generally get handled by the task itself, but that's often ugly, verbose and using this approach gulp will return an exit code of 0, even though some steps actually failed.
Just some observations from my initial research / try out stuff on this topic:
bach
module containssettleSeries
andsettleParallel
which could be used to continue running a task chain, even when some failed. (I added it toundertaker
and it worked).So, what are your thoughts? I appreciate any hints for implementing this, If you like such a feature.
The text was updated successfully, but these errors were encountered: