File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
supportedBackends/aws/src/main/scala/cromwell/backend/impl/aws Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -577,7 +577,6 @@ final case class AwsBatchJob(
577577 replaced.patch(insertionPoint, preamble, 0 ) +
578578 s """
579579 |{
580- |set -e
581580 |# (re-)add tags to include added volumes:
582581 |if [[ " ${doTagging}" == "true" ]]; then
583582 | echo "*** TAGGING RESOURCES ***"
@@ -588,15 +587,20 @@ final case class AwsBatchJob(
588587 |DELOCALIZATION_FAILED=0
589588 | $outputCopyCommand
590589 |echo "DELOCALIZATION RESULT: $$ DELOCALIZATION_FAILED"
590+ |rc= $$ (head -n 1 $workDir/ ${jobPaths.returnCodeFilename} 2>/dev/null) || rc=1
591591 |if [[ $$ DELOCALIZATION_FAILED -eq 1 ]]; then
592592 | echo '*** DELOCALIZATION FAILED ***'
593- | echo '*** EXITING WITH RETURN CODE 1***'
594- | exit 1
593+ | if [[ " $$ rc" -eq 0 ]]; then
594+ | echo '*** EXITING WITH RETURN CODE 1 ***'
595+ | exit 1
596+ | else
597+ | echo "*** EXITING WITH ORIGINAL RETURN CODE $$ rc ***"
598+ | exit $$ rc
599+ | fi
595600 |else
596601 | echo '*** COMPLETED DELOCALIZATION ***'
597602 |fi
598603 |echo '*** EXITING WITH RETURN CODE ***'
599- |rc= $$ (head -n 1 $workDir/ ${jobPaths.returnCodeFilename})
600604 |echo $$ rc
601605 |exit $$ rc
602606 |}
You can’t perform that action at this time.
0 commit comments