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