mirror of
https://github.com/inspec/inspec
synced 2024-11-10 23:24:18 +00:00
Merge pull request #199 from chef/fix-hasty-skip
Merged change 69ce2f13-7067-410f-972d-c87e55a436a7 From review branch fix-hasty-skip into master Signed-off-by: chartmann <chartmann@chef.io>
This commit is contained in:
commit
7d655c8a29
1 changed files with 7 additions and 1 deletions
|
@ -95,7 +95,13 @@ module Inspec
|
|||
define_method :control do |*args, &block|
|
||||
id = args[0]
|
||||
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)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue