Skip to content

Commit

Permalink
raise ActionFailed when inspec returns other than 0.
Browse files Browse the repository at this point in the history
  • Loading branch information
sawanoboly committed Nov 24, 2015
1 parent f1d699c commit 391832a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/kitchen/verifier/inspec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ def call(state)
runner = ::Inspec::Runner.new(runner_options)
runner.add_tests(tests)
debug("Running specs from: #{tests.inspect}")
runner.run
exit_code = runner.run
raise ActionFailed, "Inspec Runner returns #{exit_code}" unless exit_code == 0
end

private
Expand Down

0 comments on commit 391832a

Please sign in to comment.