Update core.func

This commit is contained in:
CanbiZ 2025-09-16 10:07:28 +02:00
parent 2b22c47976
commit b9ce802c8f

View File

@ -193,17 +193,13 @@ SILENT_LOGFILE="/tmp/silent.$$.log"
silent() {
local cmd="$*"
trap - ERR
set +Eeuo pipefail
"$@" >>"$SILENT_LOGFILE" 2>&1
local rc=$?
trap 'error_handler' ERR
set -Eeuo pipefail
if [[ $rc -ne 0 ]]; then
BASH_COMMAND="$cmd"
error_handler "$rc"
fi
return $rc
}