Change loop condition to include last argument

The last argument is not processed. 
e.g. create-new-feature.sh -h doesn't show the help information.
This commit is contained in:
Peter Wang
2025-10-17 09:03:47 +08:00
committed by GitHub
parent 3b000fce4d
commit 74f7e508a4

View File

@@ -6,7 +6,7 @@ JSON_MODE=false
SHORT_NAME=""
ARGS=()
i=0
while [ $i -lt $# ]; do
while [ $i -le $# ]; do
arg="${!i}"
case "$arg" in
--json)
@@ -197,4 +197,4 @@ else
echo "SPEC_FILE: $SPEC_FILE"
echo "FEATURE_NUM: $FEATURE_NUM"
echo "SPECIFY_FEATURE environment variable set to: $BRANCH_NAME"
fi
fi