2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-23 03:18:55 +00:00

Merge pull request #3205 from MichaelEischer/fix-quiet-verbose

Properly check that --quiet and --verbose are not combined
This commit is contained in:
Alexander Neumann 2021-01-28 13:53:31 +01:00 committed by GitHub
commit 44169d0dc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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")
} }