Skip to content

Commit

Permalink
Use SetOut from cobra to set the output for help cmd
Browse files Browse the repository at this point in the history
Currently we are using SetOutput which also sets the errWriter and is also deprecated
  • Loading branch information
praveenrewar committed Aug 25, 2022
1 parent e7d9e9f commit bc768e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/kapp/cmd/kapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func NewKappCmd(o *KappOptions, flagsFactory cmdcore.FlagsFactory) *cobra.Comman
// TODO bash completion
}

cmd.SetOutput(uiBlockWriter{o.ui}) // setting output for cmd.Help()
cmd.SetOut(uiBlockWriter{o.ui}) // setting output for cmd.Help()

cmd.SetUsageTemplate(cobrautil.HelpSectionsUsageTemplate([]cobrautil.HelpSection{
cmdcore.AppHelpGroup,
Expand Down

0 comments on commit bc768e4

Please sign in to comment.