mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Ensure secound part of the key is provided
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
parent
6c9a47f01c
commit
7a7f59210d
1 changed files with 2 additions and 0 deletions
|
@ -243,6 +243,8 @@ func parseDriverOpts(opts opts.ListOpts) (map[string][]string, error) {
|
|||
parts := strings.SplitN(o, ".", 2)
|
||||
if len(parts) < 2 {
|
||||
return nil, fmt.Errorf("invalid opt format %s", o)
|
||||
} else if strings.TrimSpace(parts[0]) == "" {
|
||||
return nil, fmt.Errorf("key cannot be empty %s", o)
|
||||
}
|
||||
values, exists := out[parts[0]]
|
||||
if !exists {
|
||||
|
|
Loading…
Add table
Reference in a new issue