summaryrefslogtreecommitdiff
path: root/lib/chef/client.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/client.rb')
-rw-r--r--lib/chef/client.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/chef/client.rb b/lib/chef/client.rb
index b27a2b693d..81173fd4f6 100644
--- a/lib/chef/client.rb
+++ b/lib/chef/client.rb
@@ -441,8 +441,13 @@ class Chef
run_context = setup_run_context
- converge_error = converge_and_save(run_context) unless (Chef::Config[:audit_mode] == true)
- audit_error = run_audits(run_context) unless (Chef::Config[:audit_mode] == false)
+ if Chef::Config[:audit_mode] != :audit_only
+ converge_error = converge_and_save(run_context)
+ end
+
+ if Chef::Config[:audit_mode] != :disabled
+ audit_error = run_audits(run_context)
+ end
if converge_error || audit_error
e = Chef::Exceptions::RunFailedWrappingError.new(converge_error, audit_error)