diff --git a/lib/inspec/base_cli.rb b/lib/inspec/base_cli.rb index 924652cd2..289ddf271 100644 --- a/lib/inspec/base_cli.rb +++ b/lib/inspec/base_cli.rb @@ -240,7 +240,7 @@ module Inspec def suppress_log_output?(opts) return false if opts['reporter'].nil? - match = %w{json json-min json-rspec junit html yaml documentation progress} & opts['reporter'].keys + match = %w{json json-min json-rspec json-automate junit html yaml documentation progress} & opts['reporter'].keys unless match.empty? match.each do |m| # check to see if we are outputting to stdout diff --git a/test/unit/base_cli_test.rb b/test/unit/base_cli_test.rb index 972083c79..d33afe64a 100644 --- a/test/unit/base_cli_test.rb +++ b/test/unit/base_cli_test.rb @@ -176,6 +176,11 @@ EOF cli.send(:suppress_log_output?, opts).must_equal true end + it 'suppresses json-automate' do + opts = { 'reporter' => { 'json-automate' => { 'stdout' => true }}} + cli.send(:suppress_log_output?, opts).must_equal true + end + it 'suppresses junit' do opts = { 'reporter' => { 'junit' => { 'stdout' => true }}} cli.send(:suppress_log_output?, opts).must_equal true