From 3745ecc5ce77a47b23a0633f59fede4f394d02b1 Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Thu, 27 Jan 2022 14:50:56 -0800 Subject: [PATCH] Fix inspec waivers in compliance mode Signed-off-by: Lamont Granquist --- lib/chef/compliance/input_collection.rb | 2 +- lib/chef/compliance/waiver_collection.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/chef/compliance/input_collection.rb b/lib/chef/compliance/input_collection.rb index a8a9d6328f5..034943f8d90 100644 --- a/lib/chef/compliance/input_collection.rb +++ b/lib/chef/compliance/input_collection.rb @@ -57,7 +57,7 @@ def from_hash(hash) # @return [Array] 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 4fe659554b3..a3d12b3a97d 100644 --- a/lib/chef/compliance/waiver_collection.rb +++ b/lib/chef/compliance/waiver_collection.rb @@ -57,7 +57,7 @@ def from_hash(hash) # @return [Array] 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.