File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import (
23
23
"k8s.io/cli-runtime/pkg/genericclioptions"
24
24
)
25
25
26
+ // Defaults
26
27
const (
27
28
DefaultCertsCountry = "US"
28
29
DefaultCertsOrg = "falcosecurity"
Original file line number Diff line number Diff line change @@ -53,13 +53,8 @@ func New(streams genericclioptions.IOStreams) *cobra.Command {
53
53
54
54
rootCmd .PersistentPreRun = func (c * cobra.Command , args []string ) {
55
55
// Set destination for usage and error messages
56
- rootCmd .SetOutput (streams .ErrOut )
57
- // Be fabulous
58
- if configOptions .Fabulous {
59
- logger .Fabulous = true
60
- logger .Color = false
61
- }
62
- logger .Level = configOptions .Verbose
56
+ c .SetOut (streams .Out )
57
+ c .SetErr (streams .ErrOut )
63
58
64
59
// When a flag is not provided by the user,
65
60
// fallback to one of (in order of precedence):
@@ -72,6 +67,13 @@ func New(streams genericclioptions.IOStreams) *cobra.Command {
72
67
c .Flags ().Set (f .Name , v )
73
68
}
74
69
})
70
+
71
+ // Be fabulous
72
+ if configOptions .Fabulous {
73
+ logger .Fabulous = true
74
+ logger .Color = false
75
+ }
76
+ logger .Level = configOptions .Verbose
75
77
}
76
78
77
79
pflags := rootCmd .PersistentFlags ()
You can’t perform that action at this time.
0 commit comments