mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-06-21 01:44:16 +02:00
don't create stack trace when set -e is disabled
This commit is contained in:
@@ -131,6 +131,8 @@ check_err() {
|
||||
# Collect bash error context before passing off to check_err()
|
||||
on_err() {
|
||||
local exit_code=$?
|
||||
# Ignore failures in blocks that explicitly disabled errexit with `set +e`.
|
||||
[[ $- == *e* ]] || return $exit_code
|
||||
# turn off xtrace to prevent added noise in debug log
|
||||
set +x 2>/dev/null || true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user