kubectl convert should not double wrap output in nested lists

pull/8/head
David Eads 2018-06-26 11:50:37 -04:00
parent 76b4699c69
commit aee798bbf3
1 changed files with 5 additions and 1 deletions

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
}