diff --git a/userspace/falco/app_actions/load_rules_files.cpp b/userspace/falco/app_actions/load_rules_files.cpp index cbec79c1..deba30ef 100644 --- a/userspace/falco/app_actions/load_rules_files.cpp +++ b/userspace/falco/app_actions/load_rules_files.cpp @@ -100,9 +100,7 @@ application::run_result application::load_rules_files() res = m_state->engine->load_rules_file(filename); - // Print the full output if verbose is true - if(m_options.verbose && - (!res->successful() || res->has_warnings())) + if((!res->successful() || (m_options.verbose && res->has_warnings()))) { printf("%s\n", (m_state->config->m_json_output ? diff --git a/userspace/falco/app_actions/validate_rules_files.cpp b/userspace/falco/app_actions/validate_rules_files.cpp index c812662b..cab4dfb5 100644 --- a/userspace/falco/app_actions/validate_rules_files.cpp +++ b/userspace/falco/app_actions/validate_rules_files.cpp @@ -56,9 +56,7 @@ application::run_result application::validate_rules_files() } else { - // Print the full output when verbose is true - if(m_options.verbose && - (!res->successful() || res->has_warnings())) + if(!res->successful() || (m_options.verbose && res->has_warnings())) { printf("%s\n", res->as_string(true).c_str()); }