From 45647fdab3e2ddebc82aa22fa4fe27f67169ac8e Mon Sep 17 00:00:00 2001 From: roxchgt Date: Thu, 28 Nov 2019 18:45:13 +0100 Subject: [PATCH] fix bug in allowedargcount() to not execute command if wrong args count --- bin/git-bulk | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/git-bulk b/bin/git-bulk index 172d866..5c0eecc 100755 --- a/bin/git-bulk +++ b/bin/git-bulk @@ -95,8 +95,11 @@ function wsnameToCurrent () { } # helper to check number of arguments -function allowedargcount () { - ( test "$paramcount" -ne "$1" ) && ( usage && echo 1>&2 "error: wrong number of arguments" && exit 1 ) +function allowedargcount { + if test "$paramcount" -ne $1; then + echo 1>&2 "error: wrong number of arguments" && usage + exit 1; + fi } # execute the bulk operation