Commit 6667b18c authored by Daniel Smith's avatar Daniel Smith

Merge pull request #6646 from smarterclayton/printer_should_include_apiversion

The versioned printer should be initialized with the mapping apiversion
parents fe2e4556 92a68ad7
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment