mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 12:15:52 +00:00
kubectl convert should not double wrap output in nested lists
This commit is contained in:
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
Block a user