From 282abb28432171d4d4995ad4be70f6227986895b Mon Sep 17 00:00:00 2001 From: linsui <2873532-linsui@users.noreply.gitlab.com> Date: Fri, 9 May 2025 14:00:56 +0800 Subject: [PATCH] tools/auto-merge: fix error handle --- tools/auto-merge.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/auto-merge.sh b/tools/auto-merge.sh index a45123c0e2..870fbaadb7 100755 --- a/tools/auto-merge.sh +++ b/tools/auto-merge.sh @@ -7,9 +7,9 @@ cd "$(dirname "$(dirname "${BASH_SOURCE[0]}")")" mr=$1 glab="glab --repo fdroid/fdroiddata" function retry { - while output=$("$@"); [[ $? != 0 ]]; do - echo $output | grep -q "Source branch does not exist" && break - echo $output | grep -q "this merge request has already been merged" && break + while output=$("$@" 2>&1); [[ $? != 0 ]]; do + echo $output | grep -q "Source branch does not exist" && exit 0 + echo $output | grep -q "this merge request has already been merged" && exit 0 continue done echo $output