From 6a0a9666b9ba52a5161ff029734e9e7691f096c9 Mon Sep 17 00:00:00 2001 From: Nikita Mathur Date: Mon, 17 Oct 2022 18:43:47 +0530 Subject: [PATCH] Logging stderr backtrace coming from inspec exec Signed-off-by: Nikita Mathur --- lib/inspec/cli.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/inspec/cli.rb b/lib/inspec/cli.rb index 894dd46bc..001555eda 100644 --- a/lib/inspec/cli.rb +++ b/lib/inspec/cli.rb @@ -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