Skip to content

Commit

Permalink
Fix command panic by returning empty (not nil) map (#5603)
Browse files Browse the repository at this point in the history
Fixes #5600
  • Loading branch information
kalafut authored and briankassouf committed Nov 9, 2018
1 parent 612120e commit f69fe93
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions command/base_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ func parseArgsDataString(stdin io.Reader, args []string) (map[string]string, err
if err := mapstructure.WeakDecode(raw, &result); err != nil {
return nil, errors.Wrap(err, "failed to convert values to strings")
}
if result == nil {
result = make(map[string]string)
}
return result, nil
}

Expand Down

0 comments on commit f69fe93

Please sign in to comment.