Skip to content

Commit 50abe19

Browse files
committed
Exit also in case of error due to timeout
1 parent a509676 commit 50abe19

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Utilities/Tools/jobutils.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ taskwrapper() {
307307
eval "${hook}"
308308
fi
309309
[ "${JOBUTILS_PRINT_ON_ERROR}" ] && echo ----- Last log: ----- && pwd && cat ${logfile} && echo ----- End of log -----
310+
[[ ! "${JOBUTILS_NOEXIT_ON_ERROR}" ]] && [[ ! $- == *i* ]] && exit 1
310311
return 1
311312
fi
312313
fi
@@ -324,6 +325,7 @@ taskwrapper() {
324325
eval "${hook}"
325326
fi
326327
[ "${JOBUTILS_PRINT_ON_ERROR}" ] && echo ----- Last log: ----- && pwd && cat ${logfile} && echo ----- End of log -----
328+
[[ ! "${JOBUTILS_NOEXIT_ON_ERROR}" ]] && [[ ! $- == *i* ]] && exit 1
327329
return 1
328330
fi
329331
fi

0 commit comments

Comments
 (0)