summaryrefslogtreecommitdiff
path: root/lib/chef/client.rb
diff options
context:
space:
mode:
authortyler-ball <tyleraball@gmail.com>2014-11-26 14:12:03 -0800
committertyler-ball <tyleraball@gmail.com>2014-12-17 18:52:21 -0800
commitd454a7214b2738acd9a00e1f29737927a4a4d5d7 (patch)
treee96081d9922af763215d6ab44ac4b54041c45b96 /lib/chef/client.rb
parentb079e015f4ebb8c5db600bd49641699cbbacdb10 (diff)
downloadchef-d454a7214b2738acd9a00e1f29737927a4a4d5d7.tar.gz
Failing an audit example will now raise an error and make chef exit with a non-zero code
Diffstat (limited to 'lib/chef/client.rb')
-rw-r--r--lib/chef/client.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/client.rb b/lib/chef/client.rb
index aa0d6722fe..5d46794745 100644
--- a/lib/chef/client.rb
+++ b/lib/chef/client.rb
@@ -358,9 +358,10 @@ class Chef
Chef::Log.info("Starting audit phase")
auditor = Chef::Audit::Runner.new(run_context)
auditor.run
+ raise Chef::Exceptions::AuditsFailed if auditor.failed_examples?
@events.audit_phase_complete
rescue Exception => e
- Chef::Log.error("Audit phase failed with error message #{e.message}")
+ Chef::Log.error("Audit phase failed with error message: #{e.message}")
@events.audit_phase_failed(e)
audit_exception = e
end