mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-02-25 05:57:26 +00:00
testing
This commit is contained in:
@@ -193,13 +193,17 @@ SILENT_LOGFILE="/tmp/silent.$$.log"
|
||||
|
||||
silent() {
|
||||
local cmd="$*"
|
||||
set +Eeuo pipefail
|
||||
|
||||
trap - ERR
|
||||
"$@" >>"$SILENT_LOGFILE" 2>&1
|
||||
local rc=$?
|
||||
set -Eeuo pipefail
|
||||
trap 'error_handler' ERR
|
||||
|
||||
if [[ $rc -ne 0 ]]; then
|
||||
error_handler "$rc" "$cmd"
|
||||
BASH_COMMAND="$cmd"
|
||||
error_handler "$rc"
|
||||
fi
|
||||
|
||||
return $rc
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user