summaryrefslogtreecommitdiff
path: root/lib/chef
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2022-01-27 14:50:56 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2022-01-27 14:50:56 -0800
commit3745ecc5ce77a47b23a0633f59fede4f394d02b1 (patch)
treec6b01abde98b0d2891b7afea36077da58ee1c330 /lib/chef
parent48218ffe8e60f6216611a867b35b128ad58f0c0c (diff)
downloadchef-3745ecc5ce77a47b23a0633f59fede4f394d02b1.tar.gz
Fix inspec waivers in compliance mode
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef')
-rw-r--r--lib/chef/compliance/input_collection.rb2
-rw-r--r--lib/chef/compliance/waiver_collection.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/compliance/input_collection.rb b/lib/chef/compliance/input_collection.rb
index a8a9d6328f..034943f8d9 100644
--- a/lib/chef/compliance/input_collection.rb
+++ b/lib/chef/compliance/input_collection.rb
@@ -57,7 +57,7 @@ class Chef
# @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.
diff --git a/lib/chef/compliance/waiver_collection.rb b/lib/chef/compliance/waiver_collection.rb
index 4fe659554b..a3d12b3a97 100644
--- a/lib/chef/compliance/waiver_collection.rb
+++ b/lib/chef/compliance/waiver_collection.rb
@@ -57,7 +57,7 @@ class Chef
# @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.