diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/share/poudriere/common.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/share/poudriere/common.sh b/src/share/poudriere/common.sh index 8590448b..242e9c5b 100755 --- a/src/share/poudriere/common.sh +++ b/src/share/poudriere/common.sh @@ -1280,10 +1280,12 @@ sig_handler() { } exit_handler() { + exit_status="$?" case "${SHFLAGS}" in *x*) ;; *) local -; set +x ;; esac + # Ignore errors while cleaning up set +e ERRORS_ARE_FATAL=0 @@ -1321,6 +1323,9 @@ exit_handler() { cd "${MASTER_DATADIR}" fi fi + if [ "${exit_status}" -ne 0 ] && [ "${CRASHED:-0}" -eq 0 ]; then + echo "[ERROR] Unhandled error! Exiting ${exit_status}" >&2 + fi if was_a_jail_run; then # Don't use jail for any caching in cleanup SHASH_VAR_PATH="${SHASH_VAR_PATH_DEFAULT}" |