💫 Toolkit to help you get started with SDD or any other process!
fix: correct argument parsing in create-new-feature.sh script
hongxuwwb37a9516d063
diff --git a/scripts/bash/create-new-feature.sh b/scripts/bash/create-new-feature.shindex 510f62046..01bdf915b 100644--- a/scripts/bash/create-new-feature.sh+++ b/scripts/bash/create-new-feature.sh@@ -5,20 +5,26 @@ set -eJSON_MODE=falseSHORT_NAME=""ARGS=()-i=0-while [ $i -lt $# ]; do+i=1+while [ $i -le $# ]; doarg="${!i}"case "$arg" in--json)JSON_MODE=true;;--short-name)- if [ $((i + 1)) -ge $# ]; then+ if [ $((i + 1)) -gt $# ]; thenecho 'Error: --short-name requires a value' >&2exit 1fii=$((i + 1))- SHORT_NAME="${!i}"+ next_arg="${!i}"+ # Check if the next argument is another option (starts with --)+ if [[ "$next_arg" == --* ]]; then+ echo 'Error: --short-name requires a value' >&2+ exit 1+ fi+ SHORT_NAME="$next_arg";;--help|-h)echo "Usage: $0 [--json] [--short-name <name>] <feature_description>"