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:
Daniel Smith 2015-04-09 13:26:47 -07:00
commit 6667b18c7c

View File

@ -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 {