mirror of
https://github.com/inspec/inspec
synced 2024-11-26 22:50:36 +00:00
Set exit status to return value of Inspec Runner
When invoking inspec using ```inspec exec PATH```, the script always exits with a 0 status code. This pull request proposes to exit with the same status code as the Inspec Runner. This behavior is consistent with how testing platforms of this type typically work.
This commit is contained in:
parent
d17b95b131
commit
10fb57f6a5
1 changed files with 1 additions and 1 deletions
|
@ -87,7 +87,7 @@ class InspecCLI < Thor # rubocop:disable Metrics/ClassLength
|
|||
|
||||
runner = Inspec::Runner.new(opts)
|
||||
runner.add_tests(tests)
|
||||
runner.run
|
||||
exit runner.run
|
||||
rescue RuntimeError => e
|
||||
puts e.message
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue