Use bash trap instead: https://github.com/nextflow-io/nextflow/issues/1564 ``` trap 'if [[ $? == expected_error ]]; then echo OK; exit 0; fi' EXIT ```
Use bash trap instead:
nextflow-io/nextflow#1564