This needed to be a flat_map because :profiles was an array.

Entirely on me. Pushing this through to rectify my mistake in review.

Signed-off-by: Ryan Davis <zenspider@chef.io>
This commit is contained in:
Ryan Davis 2019-05-18 15:16:09 -07:00
parent f1654c02d2
commit 62890e4809

View file

@ -167,7 +167,7 @@ module Inspec::Reporters
def all_unique_controls
@unique_controls ||= begin
run_data[:profiles].map { |profile|
run_data[:profiles].flat_map { |profile|
profile[:controls]
}.uniq
end