mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-02-25 05:57:26 +00:00
Improve error handling and silent logging
Expanded explain_exit_code with more exit codes for various tools (APT, Node.js, Python, databases) for better diagnostics. Updated silent() to set BASH_COMMAND on failure for improved error context.
This commit is contained in:
@@ -193,8 +193,13 @@ set_std_mode() {
|
||||
SILENT_LOGFILE="/tmp/silent.$$.log"
|
||||
|
||||
silent() {
|
||||
local cmd="$*"
|
||||
"$@" >>"$SILENT_LOGFILE" 2>&1
|
||||
return $?
|
||||
local rc=$?
|
||||
if [[ $rc -ne 0 ]]; then
|
||||
BASH_COMMAND="$cmd"
|
||||
fi
|
||||
return $rc
|
||||
}
|
||||
|
||||
# Function to download & save header files
|
||||
|
||||
Reference in New Issue
Block a user