mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
Merge pull request #6646 from smarterclayton/printer_should_include_apiversion
The versioned printer should be initialized with the mapping apiversion
This commit is contained in:
commit
6667b18c7c
@ -373,7 +373,7 @@ func (f *Factory) PrinterForMapping(cmd *cobra.Command, mapping *meta.RESTMappin
|
||||
if len(version) == 0 {
|
||||
return nil, fmt.Errorf("you must specify an output-version when using this output format")
|
||||
}
|
||||
printer = kubectl.NewVersionedPrinter(printer, mapping.ObjectConvertor, version)
|
||||
printer = kubectl.NewVersionedPrinter(printer, mapping.ObjectConvertor, version, mapping.APIVersion)
|
||||
} else {
|
||||
printer, err = f.Printer(mapping, GetFlagBool(cmd, "no-headers"))
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user