Files
ProxmoxVE/misc/error_handler.func
MickLesk 4e029b86cb silent(): use return instead of exit to allow || true error handling
Previously, silent() called exit on failure, making all 86+ instances
of '$STD cmd || true' across the codebase silently broken - the || true
never had a chance to execute.

Now silent() returns the exit code, letting callers handle errors:
- $STD cmd || true  -> works correctly (continues on failure)
- $STD cmd          -> set -e + ERR trap catches it -> error_handler()

error_handler() picks up metadata (_SILENT_FAILED_*) from silent() to
show the actual command, line number, and log tail.
2026-04-04 22:42:54 +02:00

29 KiB