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.
This commit is contained in:
@@ -4796,7 +4796,7 @@ EOF'
|
|||||||
if [[ "$is_cmd_not_found" == true ]]; then
|
if [[ "$is_cmd_not_found" == true ]]; then
|
||||||
local missing_cmd=""
|
local missing_cmd=""
|
||||||
if [[ -f "$combined_log" ]]; then
|
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
|
fi
|
||||||
if [[ -n "$missing_cmd" ]]; then
|
if [[ -n "$missing_cmd" ]]; then
|
||||||
echo -e "${TAB}${INFO} Missing command: ${GN}${missing_cmd}${CL}"
|
echo -e "${TAB}${INFO} Missing command: ${GN}${missing_cmd}${CL}"
|
||||||
|
|||||||
Reference in New Issue
Block a user