From 74f7e508a4b09894fe6496d260eb7e902f1f01e3 Mon Sep 17 00:00:00 2001 From: Peter Wang Date: Fri, 17 Oct 2025 09:03:47 +0800 Subject: [PATCH] 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. --- scripts/bash/create-new-feature.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/bash/create-new-feature.sh b/scripts/bash/create-new-feature.sh index 510f6204..243aaea4 100644 --- a/scripts/bash/create-new-feature.sh +++ b/scripts/bash/create-new-feature.sh @@ -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 \ No newline at end of file +fi