From 01d0fb485c7c6fd3c8f4bd8497b3d711152a3746 Mon Sep 17 00:00:00 2001 From: forgedhallpass <13679401+forgedhallpass@users.noreply.github.com> Date: Mon, 13 Sep 2021 22:18:43 +0300 Subject: [PATCH] Fixes 1016 # Implicitly enable the Verbose option if VerboseVerbose is set. --- v2/internal/runner/options.go | 7 ++++++- v2/internal/runner/runner.go | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/v2/internal/runner/options.go b/v2/internal/runner/options.go index b72e1a7f1..ee83b3b91 100644 --- a/v2/internal/runner/options.go +++ b/v2/internal/runner/options.go @@ -21,6 +21,11 @@ func ParseOptions(options *types.Options) { // Check if stdin pipe was given options.Stdin = hasStdin() + // if VerboseVerbose is set, it implicitly enables the Verbose option as well + if options.VerboseVerbose { + options.Verbose = true + } + // Read the inputs and configure the logging configureOutput(options) @@ -116,7 +121,7 @@ func isValidURL(urlString string) bool { // configureOutput configures the output on the screen func configureOutput(options *types.Options) { // If the user desires verbose output, show verbose output - if options.Verbose { + if options.Verbose || options.VerboseVerbose { gologger.DefaultLogger.SetMaxLevel(levels.LevelVerbose) } if options.Debug { diff --git a/v2/internal/runner/runner.go b/v2/internal/runner/runner.go index 0989fe020..1626cd63c 100644 --- a/v2/internal/runner/runner.go +++ b/v2/internal/runner/runner.go @@ -489,7 +489,7 @@ func (r *Runner) RunEnumeration() error { // 0 matches means no templates were found in directory if templateCount == 0 { - return errors.New("no templates were found") + return errors.New("no valid templates were found") } /*