call exit_hook with error message (fixes #630)

This commit is contained in:
Lukas Schauer
2019-03-03 20:08:18 +01:00
parent e623fcc024
commit 1c77730373
3 changed files with 8 additions and 2 deletions

View File

@@ -432,6 +432,7 @@ _sed() {
# Print error message and exit with error
_exiterr() {
echo "ERROR: ${1}" >&2
[[ -n "${HOOK:-}" ]] && "${HOOK}" "exit_hook" "${1}" || true
exit 1
}