Skip to content

Commit

Permalink
fix lib log config issue (#1200)
Browse files Browse the repository at this point in the history
Co-authored-by: Sandeep Singh <sandeep@projectdiscovery.io>
  • Loading branch information
dogancanbakir and ehsandeep authored Mar 26, 2024
1 parent 65149a6 commit e8cb3d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
7 changes: 2 additions & 5 deletions v2/pkg/runner/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,16 +165,13 @@ func ParseOptions() *Options {
// Check if stdin pipe was given
options.Stdin = fileutil.HasStdin()

// Read the inputs and configure the logging
options.configureOutput()

if options.Version {
gologger.Info().Msgf("Current Version: %s\n", version)
gologger.Info().Msgf("Subfinder Config Directory: %s", configDir)
os.Exit(0)
}

options.preProcessOptions()
options.preProcessDomains()

if !options.Silent {
showBanner()
Expand Down Expand Up @@ -235,7 +232,7 @@ func listSources(options *Options) {
}
}

func (options *Options) preProcessOptions() {
func (options *Options) preProcessDomains() {
for i, domain := range options.Domain {
options.Domain[i], _ = sanitize(domain)
}
Expand Down
1 change: 1 addition & 0 deletions v2/pkg/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ type Runner struct {
// the configuration options, configuring sources, reading lists
// and setting up loggers, etc.
func NewRunner(options *Options) (*Runner, error) {
options.configureOutput()
runner := &Runner{options: options}

// Check if the application loading with any provider configuration, then take it
Expand Down

0 comments on commit e8cb3d9

Please sign in to comment.