Merge pull request #15982 from Security-Onion-Solutions/reyesj2/wip

don't create stack trace when set -e is disabled
This commit is contained in:
Jorge Reyes
2026-06-18 15:25:41 -05:00
committed by GitHub
+2
View File
@@ -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