Fix repo-add

Commit 4f43ce3e4a broke repo-add by
switching to parseopts without accounting for the added "--". This caused
the dbname to always be read as "--".

Accounts for "--" and makes repo-add respect "--" as end of opts.
This commit is contained in:
morganamilo 2022-12-17 18:43:13 +00:00 committed by Allan McRae
parent a194197369
commit 52eb094aa2

View file

@ -611,7 +611,7 @@ unset OPT_SHORT OPT_LONG OPTRET
declare -a args
# parse arguments
while (( $# )); do
while true; do
case $1 in
-q|--quiet) QUIET=1;;
-n|--new) ONLYADDNEW=1;;
@ -634,13 +634,16 @@ while (( $# )); do
--include-sigs)
INCLUDE_SIGS=1
;;
*)
args+=("$1")
--)
shift
break
;;
esac
shift
done
args=("$@")
# check if messages are to be printed using color
if [[ -t 2 && $USE_COLOR != "n" ]]; then
colorize