From 3bfce366acea3fdc2620ac7552656808b48c97a4 Mon Sep 17 00:00:00 2001 From: Roman Artiukhin Date: Thu, 29 Jan 2026 12:13:26 +0200 Subject: [PATCH] hiby: r1_patcher: stop script execution on any error Change-Id: Ic683b8ed155a5e9d2779d40a3b7673579056d9b1 --- tools/r1_patcher/r1_patcher.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/r1_patcher/r1_patcher.sh b/tools/r1_patcher/r1_patcher.sh index 7d1653310e..7cc102044b 100755 --- a/tools/r1_patcher/r1_patcher.sh +++ b/tools/r1_patcher/r1_patcher.sh @@ -8,6 +8,12 @@ if [[ $# -ne 2 ]]; then exit 1 fi +# Fail fast on any error, undefined variable, or failed pipeline +set -euo pipefail + +# Report errors with line number and the failing command +trap 'echo "ERROR at line ${LINENO}: ${BASH_COMMAND}" >&2' ERR + ################################################################################ ### init ################################################################################