From 96fc169f4b33bf43314fc71bce3cd6a39077a85f Mon Sep 17 00:00:00 2001 From: MickLesk Date: Sat, 21 Mar 2026 19:16:33 +0100 Subject: [PATCH] fix(build): prevent error handler crash from pipefail on grep The missing_cmd grep pipeline in the install error handler runs under set -o pipefail. When grep finds no match (exit 1), the entire pipeline fails and triggers the ERR trap recursively, crashing the recovery menu. Add || true to suppress this. --- misc/build.func | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/build.func b/misc/build.func index 184e34b95..d02d37f43 100644 --- a/misc/build.func +++ b/misc/build.func @@ -4796,7 +4796,7 @@ EOF' if [[ "$is_cmd_not_found" == true ]]; then local missing_cmd="" if [[ -f "$combined_log" ]]; then - missing_cmd=$(grep -oiE '[a-zA-Z0-9_.-]+: command not found' "$combined_log" | tail -1 | sed 's/: command not found//') + missing_cmd=$(grep -oiE '[a-zA-Z0-9_.-]+: command not found' "$combined_log" | tail -1 | sed 's/: command not found//' || true) fi if [[ -n "$missing_cmd" ]]; then echo -e "${TAB}${INFO} Missing command: ${GN}${missing_cmd}${CL}"