Skip to content

Commit

Permalink
Ensure secound part of the key is provided
Browse files Browse the repository at this point in the history
Docker-DCO-1.1-Signed-off-by: Michael Crosby <[email protected]> (github: crosbymichael)
  • Loading branch information
crosbymichael committed Mar 31, 2014
1 parent 6c9a47f commit 7a7f592
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions runconfig/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7a7f592

Please sign in to comment.