mirror of
https://github.com/restic/restic.git
synced 2024-09-28 13:21:54 +02:00
Properly check that --quiet and --verbose are not combined
If --verbose is specified once, then globalOptions.Verbose == 1. Previously --quiet --verbose would silently ignore the --verbose flag.
This commit is contained in:
parent
b2efa0af39
commit
97388b3504
@ -32,7 +32,7 @@ directories in an encrypted repository stored on different backends.
|
|||||||
PersistentPreRunE: func(c *cobra.Command, args []string) error {
|
PersistentPreRunE: func(c *cobra.Command, args []string) error {
|
||||||
// set verbosity, default is one
|
// set verbosity, default is one
|
||||||
globalOptions.verbosity = 1
|
globalOptions.verbosity = 1
|
||||||
if globalOptions.Quiet && (globalOptions.Verbose > 1) {
|
if globalOptions.Quiet && globalOptions.Verbose > 0 {
|
||||||
return errors.Fatal("--quiet and --verbose cannot be specified at the same time")
|
return errors.Fatal("--quiet and --verbose cannot be specified at the same time")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user