mirror of https://github.com/k3s-io/k3s
kubectl convert should not double wrap output in nested lists
parent
76b4699c69
commit
aee798bbf3
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue