From b4676cb04ccab60e8bf8fadbc8532bf5efcc2bde Mon Sep 17 00:00:00 2001 From: petur Date: Mon, 20 Apr 2026 21:43:16 +0200 Subject: [PATCH] call_hook: check task_error after executed hooks, Closes: #1121552 --- lib/subroutines | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/subroutines b/lib/subroutines index f86c0a0a5..db146e761 100755 --- a/lib/subroutines +++ b/lib/subroutines @@ -353,7 +353,7 @@ call_hook() { local hook=$1 shift - local cl dflag hfile + local cl dflag hfile te [ "$debug" ] && dflag="-d" for cl in $classes; do @@ -383,6 +383,12 @@ call_hook() { # execute the hook $hfile $dflag "$@" check_status $hook.$cl $? + te=$(< $LOGDIR/task_error) + if [ "$te" -gt "$STOP_ON_ERROR" ]; then + task_error=$te + task_error_func=$hook.$cl + stop_fai_installation + fi fi done }