Skip to content

Commit 936c219

Browse files
committed
Removed debug code and added a comment
1 parent 2517841 commit 936c219

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

argument-parser.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,8 @@ for argChunk in "${argChunks[@]}"; do
169169

170170
# Check if we've passed the last argument marker
171171
if [ $endOfArguments == 1 ]; then
172+
# Add this chunk to the array or parameters
172173
parameters+=("$argChunk")
173-
echo "#:$argChunk"
174174
continue
175175
fi
176176

@@ -272,6 +272,10 @@ for argChunk in "${argChunks[@]}"; do
272272
fi
273273
done
274274

275+
# Reassign the positional arguments to any that occurred after the end of arguments marker (--)
276+
set -- ${parameters[@]}
277+
278+
275279
[ "$ARG_DEBUG" == true ] && echo "Argument array:"
276280
[ "$ARG_DEBUG" == true ] && for k in "${!argv[@]}"
277281
do

0 commit comments

Comments
 (0)