mirror of
https://github.com/inspec/inspec
synced 2024-11-27 07:00:39 +00:00
bugfix: dont skip controls during json generation
This commit is contained in:
parent
3926cadea9
commit
6e548364f4
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue