RFE: make shell script generated to execute command section less fragile #91

Open
noblem opened this Issue Feb 15, 2017 · 0 comments

Comments

Projects
None yet
1 participant

noblem commented Feb 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')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment