From 0e66031e3ca92fa0ce2e6b6642d36304150f38a2 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 16 Sep 2025 09:59:06 +0200 Subject: [PATCH] error-handler --- misc/core.func | 4 +--- misc/error_handler.func | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/misc/core.func b/misc/core.func index 1cbc1d19..1fc9e034 100644 --- a/misc/core.func +++ b/misc/core.func @@ -202,10 +202,8 @@ silent() { if [[ $rc -ne 0 ]]; then BASH_COMMAND="$cmd" - error_handler "$rc" + return $rc fi - - return $rc } # Check if the shell is using bash diff --git a/misc/error_handler.func b/misc/error_handler.func index 673927f4..2e9ee019 100644 --- a/misc/error_handler.func +++ b/misc/error_handler.func @@ -85,8 +85,8 @@ error_handler() { local line_number=${BASH_LINENO[0]:-unknown} local command=${BASH_COMMAND:-unknown} - # $STD im Kommando entfernen (nur kosmetisch) - command=${command//\$STD /} + # $STD removal to show the actual failing command + command="${command//\$STD/}" if [[ "$exit_code" -eq 0 ]]; then return 0