Skip to content

Commit

Permalink
Merge pull request #12523 from chef/lcg/fix-inspec-waivers
Browse files Browse the repository at this point in the history
Fix inspec waivers in compliance mode
  • Loading branch information
tas50 committed Jan 28, 2022
2 parents 5053bf4 + 3745ecc commit 15daf49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/chef/compliance/input_collection.rb
Expand Up @@ -57,7 +57,7 @@ def from_hash(hash)
# @return [Array<Input>] inspec inputs which are enabled in a form suitable to pass to inspec
#
def inspec_data
select(&:enabled?).each_with_object({}) { |input, hash| hash.merge(input.inspec_data) }
select(&:enabled?).each_with_object({}) { |input, hash| hash.merge!(input.inspec_data) }
end

# DSL method to enable input files. This matches on the filename of the input file.
Expand Down
2 changes: 1 addition & 1 deletion lib/chef/compliance/waiver_collection.rb
Expand Up @@ -57,7 +57,7 @@ def from_hash(hash)
# @return [Array<Waiver>] inspec waivers which are enabled in a form suitable to pass to inspec
#
def inspec_data
select(&:enabled?).each_with_object({}) { |waiver, hash| hash.merge(waiver.inspec_data) }
select(&:enabled?).each_with_object({}) { |waiver, hash| hash.merge!(waiver.inspec_data) }
end

# DSL method to enable waiver files. This matches on the filename of the waiver file.
Expand Down

0 comments on commit 15daf49

Please sign in to comment.