diff --git a/cmd/katana/main.go b/cmd/katana/main.go index 5d18fed3..ac742f7a 100644 --- a/cmd/katana/main.go +++ b/cmd/katana/main.go @@ -183,11 +183,6 @@ pipelines offering both headless and non-headless crawling.`) } } - if options.KnownFiles != "" && options.MaxDepth < 3 { - gologger.Info().Msgf("Depth automatically set to 3 to accommodate the `--known-files` option (originally set to %d).", options.MaxDepth) - options.MaxDepth = 3 - } - cleanupOldResumeFiles() return flagSet, nil } diff --git a/internal/runner/options.go b/internal/runner/options.go index 5f003e53..f78aeafa 100644 --- a/internal/runner/options.go +++ b/internal/runner/options.go @@ -52,6 +52,10 @@ func validateOptions(options *types.Options) error { } options.FilterRegex = append(options.FilterRegex, cr) } + if options.KnownFiles != "" && options.MaxDepth < 3 { + gologger.Info().Msgf("Depth automatically set to 3 to accommodate the `--known-files` option (originally set to %d).", options.MaxDepth) + options.MaxDepth = 3 + } gologger.DefaultLogger.SetFormatter(formatter.NewCLI(options.NoColors)) return nil }