diff options
author | tyler-ball <tyleraball@gmail.com> | 2014-11-26 14:12:03 -0800 |
---|---|---|
committer | tyler-ball <tyleraball@gmail.com> | 2014-12-17 18:52:21 -0800 |
commit | d454a7214b2738acd9a00e1f29737927a4a4d5d7 (patch) | |
tree | e96081d9922af763215d6ab44ac4b54041c45b96 /lib/chef/client.rb | |
parent | b079e015f4ebb8c5db600bd49641699cbbacdb10 (diff) | |
download | chef-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.rb | 3 |
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 |