Logging stderr backtrace coming from inspec exec

Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
This commit is contained in:
Nikita Mathur 2022-10-17 18:43:47 +05:30
parent 8912f1a71a
commit 6a0a9666b9

View file

@ -366,8 +366,10 @@ class Inspec::InspecCLI < Inspec::BaseCLI
ui.exit runner.run
rescue ArgumentError, RuntimeError, Train::UserError => e
$stderr.puts e.message
$stderr.puts e.backtrace
ui.exit Inspec::UI::EXIT_USAGE_ERROR
rescue StandardError => e
$stderr.puts e.backtrace
pretty_handle_exception(e)
end