From 9d496e563b9e958b2971048f1d8dfc8bbd6cf8e6 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 16 Sep 2025 11:02:21 +0200 Subject: [PATCH] Update core.func --- misc/core.func | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/misc/core.func b/misc/core.func index 985685a1..53c40304 100644 --- a/misc/core.func +++ b/misc/core.func @@ -199,7 +199,19 @@ silent() { set -Eeuo pipefail if [[ $rc -ne 0 ]]; then - error_handler "$rc" "$cmd" + local explanation + explanation="$(explain_exit_code "$rc")" + + printf "\e[?25h" + echo -e "\n${RD}[ERROR]${CL}: exit code ${RD}${rc}${CL} (${explanation}): while executing command ${YW}${cmd}${CL}\n" + + if [[ -s "$SILENT_LOGFILE" ]]; then + echo "--- Last 20 lines of silent log ($SILENT_LOGFILE) ---" + tail -n 20 "$SILENT_LOGFILE" + echo "---------------------------------------------------" + fi + + exit "$rc" fi return $rc