I'm wondering if there is a configuration for stoping the script when a failure happens? #3
Replies: 5 comments 2 replies
-
|
Sorry I didn't see this earlier, I have already made an issue for this and will get started with it when I get home. |
Beta Was this translation helpful? Give feedback.
-
|
Hey @neil-armstrong-instil if you've got a minute I would love your opinion. Do you feel the default should be to continue or stop on fail? I think it should be to stop, and configurable to continue if people want that. |
Beta Was this translation helpful? Give feedback.
-
|
Sorry couldn't get this done tonight, weird issues with catching the error. I will pick this back up tomorrow. |
Beta Was this translation helpful? Give feedback.
-
|
So the underlying issue was on exit / close of the child process, it wasn't checking the status code to see if it was a success or not. In version 1.2.0 it now checks the status code and rejects appropriately. This fixes your issue as the process will stop if the shared module fails to build. But for some reason the trycatch fails to catch the promise being thrown so controlling what should happen on failure is difficult. |
Beta Was this translation helpful? Give feedback.
-
|
I have just pushed version 1.2.1, adding in an optional parameter to the command() function called 'ContinueOnFailure' setting this to true well then essentially revert back to the pre 1.2.0 implementation of continuing on to the next steps even if the step fails. This defaults to false, ending the flow in the case that a step fails. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a generic "build" script which runs the build in each of my projects in a monorepo and I want to it fail if any of the builds fail. I have it setup like this:
So it will run the "shared" folder first, followed by webapp, electron, and acceptance tests in parallel. However when I force the "shared" folder to fail (via a basic test that just throws an error) it will just carry on with the rest of the build commands and not "fail the build". I also presume github actions won't be aware of the failure either which means I'd sadly still need to provide a package.json flavor of this command for CI purposes :(.
I can have a poke around to create a pull request if this is something that doesn't exist yet as I do quite like the idea of the library!
Beta Was this translation helpful? Give feedback.
All reactions