Added debug printing to failing functional tests

dev
Ice3man 2022-03-01 13:28:43 +05:30
parent fbcf9e2436
commit 5c264b043f
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")
}
data, err := cmd.Output()
if debug {
fmt.Println(string(data))
}
if err != nil {
return nil, err
}
@ -76,6 +79,9 @@ func RunNucleiBinaryAndGetLoadedTemplates(nucleiBinary string, debug bool, args
fmt.Println(cmd.String())
}
data, err := cmd.CombinedOutput()
if debug {
fmt.Println(string(data))
}
if err != nil {
return "", err
}