Skip to content

Commit

Permalink
kubectl convert should not double wrap output in nested lists
Browse files Browse the repository at this point in the history
  • Loading branch information
deads2k committed Jun 26, 2018
1 parent 76b4699 commit aee798b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/kubectl/cmd/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,11 @@ func (o *ConvertOptions) RunConvert() error {
}

if meta.IsListType(objects) {
obj, err := objectListToVersionedObject([]runtime.Object{objects}, o.specifiedOutputVersion)
listContent, err := meta.ExtractList(objects)
if err != nil {
return err
}
obj, err := objectListToVersionedObject(listContent, o.specifiedOutputVersion)
if err != nil {
return err
}
Expand Down

0 comments on commit aee798b

Please sign in to comment.