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:
parent
72ba4fb83f
commit
969dcddbdf
1 changed files with 1 additions and 1 deletions
|
@ -3,7 +3,7 @@ parse_options() {
|
||||||
local short_options=$1; shift;
|
local short_options=$1; shift;
|
||||||
local long_options=$1; shift;
|
local long_options=$1; shift;
|
||||||
local ret=0;
|
local ret=0;
|
||||||
local unused_options=""
|
local unused_options=()
|
||||||
local i
|
local i
|
||||||
|
|
||||||
while [[ -n $1 ]]; do
|
while [[ -n $1 ]]; do
|
||||||
|
|
Loading…
Add table
Reference in a new issue