File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,8 +72,11 @@ capabilities.
7272 PersistentPreRunE : func (c * cobra.Command , _ []string ) error {
7373 version .WarnIfNotLatestVersion (c .Context ())
7474
75- var envVerbosity = env .GetVerbosity ()
76- rootCmdVerbose = rootCmdVerbose + envVerbosity
75+ verbosityFrom := "command line argument"
76+ if envVerbosity := env .GetVerbosity (); envVerbosity > rootCmdVerbose {
77+ rootCmdVerbose = envVerbosity
78+ verbosityFrom = "environment variable ESCAPE_VERBOSITY"
79+ }
7780
7881 if rootCmdVerbose > 0 { //nolint:mnd
7982 log .SetLevel (logrus .InfoLevel )
@@ -87,7 +90,7 @@ capabilities.
8790 if rootCmdVerbose > 3 { //nolint:mnd
8891 escape .Debug = true
8992 }
90- log .Info ("Verbose mode: %d" , rootCmdVerbose )
93+ log .Info ("Verbose mode: %d from %s " , rootCmdVerbose , verbosityFrom )
9194 log .Info ("escape-cli version: %s" , version .GetVersion ().String ())
9295 err := out .SetOutput (rootCmdOutputStr )
9396 if err != nil {
You can’t perform that action at this time.
0 commit comments