collapse printing paths

This commit is contained in:
David Eads
2018-02-20 20:14:21 -05:00
parent 799a0bf410
commit be04e7c1b1
95 changed files with 594 additions and 1055 deletions

View File

@@ -210,9 +210,9 @@ func RunPatch(f cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []strin
}
if len(options.OutputFormat) > 0 && options.OutputFormat != "name" {
return f.PrintResourceInfoForCommand(cmd, info, out)
return cmdutil.PrintObject(cmd, info.Object, out)
}
f.PrintSuccess(options.OutputFormat == "name", out, info.Mapping.Resource, info.Name, false, dataChangedMsg)
cmdutil.PrintSuccess(options.OutputFormat == "name", out, info.Object, false, dataChangedMsg)
// if object was not successfully patched, exit with error code 1
if !didPatch {
@@ -246,7 +246,7 @@ func RunPatch(f cmdutil.Factory, out io.Writer, cmd *cobra.Command, args []strin
if err := info.Refresh(targetObj, true); err != nil {
return err
}
return f.PrintResourceInfoForCommand(cmd, info, out)
return cmdutil.PrintObject(cmd, info.Object, out)
})
if err != nil {
return err