Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/freebsd/poudriere.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/share/poudriere/common.sh5
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}"