mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
fix bug in allowedargcount() to not execute command if wrong args count
This commit is contained in:
parent
292149c46f
commit
45647fdab3
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue