1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04:00

parse_options: initialize unused_options as array

Since we treat this as an array, we need to initialize it as one. This
avoids addition of an empty element to the option string when we set the
option array from the calling program, e.g.

  +/usr/bin/makepkg[2033]: set -- -i --pkg vim -- ''

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dave Reisner 2012-03-20 09:02:56 -04:00 committed by Dan McGee
parent 72ba4fb83f
commit 969dcddbdf

View File

@ -3,7 +3,7 @@ parse_options() {
local short_options=$1; shift;
local long_options=$1; shift;
local ret=0;
local unused_options=""
local unused_options=()
local i
while [[ -n $1 ]]; do