mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 12:43:23 +00:00
Merge pull request #65489 from deads2k/cli-80-convert
Automatic merge from submit-queue (batch tested with PRs 64246, 65489, 65443). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. kubectl convert should not double wrap output in nested lists @kubernetes/sig-cli-maintainers @soltysh ```release-note kubectl convert previous created a list inside of a list. Now it is only wrapped once. ```
This commit is contained in:
commit
c581d09bc2
@ -181,7 +181,11 @@ func (o *ConvertOptions) RunConvert() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if meta.IsListType(objects) {
|
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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user