value of a container option (e.g. array) is reset to empty on first specification
This commit is contained in:
+1
-1
@@ -71,7 +71,7 @@ func (opt *cliOptionStringMap) parse(parser cliParser, argIndex int, valuePtr *s
|
||||
err = errInvalidOptionValue(opt.name, boxedValue, "map of string")
|
||||
}
|
||||
} else {
|
||||
if dict == nil {
|
||||
if dict == nil || !opt.alreadySeen {
|
||||
dict = make(map[string]string)
|
||||
}
|
||||
for value := range strings.SplitSeq(value, ",") {
|
||||
|
||||
Reference in New Issue
Block a user