No warning(s) in the output file with -quiet option. Report command (#885)

This commit is contained in:
DjinnS
2019-08-25 03:56:42 +02:00
committed by Kota Kanbe
parent d5e2040cef
commit dec5d3b165
4 changed files with 20 additions and 1 deletions

View File

@@ -104,6 +104,10 @@ func formatOneLineSummary(rs ...models.ScanResult) string {
r.FormatServerName(), r.Warnings))
}
}
// We don't want warning message to the summary file
if config.Conf.Quiet {
return fmt.Sprintf("%s\n", table)
}
return fmt.Sprintf("%s\n\n%s", table, strings.Join(
warnMsgs, "\n\n"))
}