From d122faf0cb446b2568eaf0c461e77b406daa8a6f Mon Sep 17 00:00:00 2001 From: Per Held Date: Thu, 22 May 2025 10:12:53 +0200 Subject: [PATCH] Arm backend: Make pre-push non-interactive on one argument Calling pre-push as a git hook actually supplies it with 2 arguments, remote-name and remote-url. So the logic of automatically going non-interactive when there are any arguments is flawed. This commit makes sure pre-push only goes non-interactive when there is only one argument. Signed-off-by: per.held@arm.com Change-Id: I21cc05b24521bb075c2f74fe4ed7f773b797b085 --- backends/arm/scripts/pre-push | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backends/arm/scripts/pre-push b/backends/arm/scripts/pre-push index b9a5b567a42..a4e877fdcfc 100755 --- a/backends/arm/scripts/pre-push +++ b/backends/arm/scripts/pre-push @@ -4,9 +4,9 @@ # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. -# Calling this script with any argument is equal to launching it in +# Calling this script with one argument is equal to launching it in # non-interactive mode. "$#" gives the number of positional arguments. -[ "$#" -eq 0 ] && is_script_interactive=1 || is_script_interactive=0 +[ "$#" -eq 1 ] && is_script_interactive=1 || is_script_interactive=0 if [ $is_script_interactive -eq 1 ]; then RESET='\e[0m'