Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
RFE: make shell script generated to execute command section less fragile #91
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
noblem commentedFeb 15, 2017
•
edited
Consider a WDL command section with 2 or more Unix statements. Cromwell currently reports that such commands "succeed" even when one or more of its Unix statements fail (i.e. return a non-zero status code), as long as the final statement returns a zero status code (e.g. echo "Done").
This is fragile, and I think it's far more common to want Cromwell to report a failure in such cases than to silently ignore them.
One workaround is to chain all statements together into one effective line, using && to separate each statement, but this is less flexible and readable (uglier). To make it easier for the common case to be more robust and readable, it would be helpful to consider having the generated script file begin with "set -eo pipefail" (maybe even 'set -euo pipefail')