mirror of
https://github.com/falcosecurity/falco.git
synced 2025-06-28 07:37:32 +00:00
fix: print full rule load errors without verbose/-v
The latest released falco always prints full details on errors when used with -r (read rules)/-V (validate rules). However #2098 changed this to only print full details when verbose is true. Fix the regression by always printing errors when loading rules. Warnings will be printed only with -v. Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
This commit is contained in:
parent
2a640daf13
commit
fefd23f2f1
@ -100,9 +100,7 @@ application::run_result application::load_rules_files()
|
|||||||
|
|
||||||
res = m_state->engine->load_rules_file(filename);
|
res = m_state->engine->load_rules_file(filename);
|
||||||
|
|
||||||
// Print the full output if verbose is true
|
if((!res->successful() || (m_options.verbose && res->has_warnings())))
|
||||||
if(m_options.verbose &&
|
|
||||||
(!res->successful() || res->has_warnings()))
|
|
||||||
{
|
{
|
||||||
printf("%s\n",
|
printf("%s\n",
|
||||||
(m_state->config->m_json_output ?
|
(m_state->config->m_json_output ?
|
||||||
|
@ -56,9 +56,7 @@ application::run_result application::validate_rules_files()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Print the full output when verbose is true
|
if(!res->successful() || (m_options.verbose && res->has_warnings()))
|
||||||
if(m_options.verbose &&
|
|
||||||
(!res->successful() || res->has_warnings()))
|
|
||||||
{
|
{
|
||||||
printf("%s\n", res->as_string(true).c_str());
|
printf("%s\n", res->as_string(true).c_str());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user