bugfix: dont skip controls during json generation

This commit is contained in:
Dominik Richter 2015-11-03 01:10:05 +01:00
parent 3926cadea9
commit 6e548364f4

View file

@ -95,7 +95,13 @@ module Inspec
define_method :control do |*args, &block| define_method :control do |*args, &block|
id = args[0] id = args[0]
opts = args[1] || {} opts = args[1] || {}
return if @skip_profile
# Skip the control if the resource triggered a skip;
# However: when this is run on a mock backend, do not skip it.
# This is e.g. relevant for JSON generation, where we need all
# controls.
return if @skip_profile && os[:family] != 'unknown'
__register_rule rule_class.new(id, opts, &block) __register_rule rule_class.new(id, opts, &block)
end end