kubectl convert should not double wrap output in nested lists

This commit is contained in:
David Eads 2018-06-26 11:50:37 -04:00
parent 76b4699c69
commit aee798bbf3

View File

@ -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
}