lib/inspec/runner.rb in inspec-2.2.55 vs lib/inspec/runner.rb in inspec-2.2.61
- old
+ new
@@ -37,11 +37,10 @@
@conf = conf.dup
@conf[:logger] ||= Logger.new(nil)
@target_profiles = []
@controls = @conf[:controls] || []
@depends = @conf[:depends] || []
- @ignore_supports = @conf[:ignore_supports]
@create_lockfile = @conf[:create_lockfile]
@cache = Inspec::Cache.new(@conf[:vendor_cache])
# parse any ad-hoc runners reporter formats
# this has to happen before we load the test_collector
@@ -106,11 +105,12 @@
def render_output(run_data)
return if @conf['reporter'].nil?
@conf['reporter'].each do |reporter|
- Inspec::Reporters.render(reporter, run_data)
+ result = Inspec::Reporters.render(reporter, run_data)
+ raise Inspec::ReporterError, "Error generating reporter '#{reporter[0]}'" if result == false
end
end
def report
Inspec::Reporters.report(@conf['reporter'].first, @run_data)
@@ -194,11 +194,9 @@
raise "Could not resolve #{target} to valid input." if profile.nil?
@target_profiles << profile if supports_profile?(profile)
end
def supports_profile?(profile)
- return true if @ignore_supports
-
if !profile.supports_runtime?
raise 'This profile requires InSpec version '\
"#{profile.metadata.inspec_requirement}. You are running "\
"InSpec v#{Inspec::VERSION}.\n"
end