I have a pipeline which looks something like below, its written in bash
Trimmomatic --> Samtools --> Smalt --> Lastz --> custom perl programs.
If anyone of those processes fails they usually return a non-0 exit code, usually a 1
.
However, my pipeline program will continue to run, report the error and return an exit code of 0, indicating success.
How can I get the pipeline to quit/stop with a non-0 exit code when a part of the pipeline fails?
Be aware that some software can "fail" when they don't fail.