Fix error in --arkopt,-optname

This should fix #1211
This commit is contained in:
Ben Peddell 2022-01-06 09:21:05 +10:00 committed by GitHub
parent 996983d989
commit 0aee12defc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3679,13 +3679,14 @@ addArkOpt() {
local optname="${1%%=*}"
local optval="${1#*=}"
local optdash="${optname:0:1}"
if [[ "${optval}" == "${1}" ]]; then
optval=""
fi
optname="${optname#-}"
optname="${optname//[^A-Za-z0-9_]/_}"
if [[ "${optval}" == "${optname}" ]]; then
optval=""
fi
if [[ "${optdash}" == "-" ]]; then
if [[ -z "${optval}" ]]; then
IFS="" read -r "arkflag_${optname}" <<<"true"