mirror of
https://github.com/inspec/inspec
synced 2024-11-26 22:50:36 +00:00
Merge pull request #5487 from inspec/vasundhara/fix_depedent_control_errors
Fix undefined method `+' for nil:NilClass\n\nProfile: - when using profile dependencies and require_controls
This commit is contained in:
commit
1e2b0e79c1
2 changed files with 4 additions and 1 deletions
|
@ -91,7 +91,7 @@ module Inspec
|
|||
end
|
||||
|
||||
def all_controls
|
||||
ret = @rules.values
|
||||
ret = @rules.values.compact
|
||||
ret += @control_subcontexts.map(&:all_rules).flatten
|
||||
ret
|
||||
end
|
||||
|
|
3
test/fixtures/profiles/dependencies/require_controls_test/controls/example1.rb
vendored
Normal file
3
test/fixtures/profiles/dependencies/require_controls_test/controls/example1.rb
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
require_controls 'profile_b' do
|
||||
control 'profileb-2'
|
||||
end
|
Loading…
Reference in a new issue