Merge pull request #1664 from projectdiscovery/functional-test-fix

Added debug printing to failing functional tests
dev
Sandeep Singh 2022-03-02 02:11:16 +05:30 committed by GitHub
commit ce0dfe6e80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -53,6 +53,9 @@ func RunNucleiBareArgsAndGetResults(debug bool, extra ...string) ([]string, erro
cmd.Args = append(cmd.Args, "-silent") cmd.Args = append(cmd.Args, "-silent")
} }
data, err := cmd.Output() data, err := cmd.Output()
if debug {
fmt.Println(string(data))
}
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -76,6 +79,9 @@ func RunNucleiBinaryAndGetLoadedTemplates(nucleiBinary string, debug bool, args
fmt.Println(cmd.String()) fmt.Println(cmd.String())
} }
data, err := cmd.CombinedOutput() data, err := cmd.CombinedOutput()
if debug {
fmt.Println(string(data))
}
if err != nil { if err != nil {
return "", err return "", err
} }