Skip to content

Commit

Permalink
sbctl: Ensure all commands inherit stdout turning off
Browse files Browse the repository at this point in the history
Signed-off-by: Morten Linderud <morten@linderud.pw>
  • Loading branch information
Foxboron committed May 30, 2021
1 parent 550b4e6 commit ae1aec1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/sbctl/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func baseFlags(cmd *cobra.Command) {
flags := cmd.PersistentFlags()
flags.BoolVar(&cmdOptions.JsonOutput, "json", false, "Output as json")

cmd.PreRun = func(cmd *cobra.Command, args []string) {
cmd.PersistentPreRun = func(cmd *cobra.Command, args []string) {
if cmdOptions.JsonOutput {
logging.PrintOff()
}
Expand Down

0 comments on commit ae1aec1

Please sign in to comment.