diff --git a/lib/inspec/rule.rb b/lib/inspec/rule.rb index 5cf087119..9cd68306b 100644 --- a/lib/inspec/rule.rb +++ b/lib/inspec/rule.rb @@ -227,9 +227,10 @@ module Inspec # all checks that were defined in the destination sc = checks(src) dst.instance_variable_set(:@__checks, sc) unless sc.empty? - # we need only the value of result not the Hash containing value and message - sr = skip_status(src)[:result] - set_skip_rule(dst, sr) unless sr.nil? + skip_check = skip_status(src) + sr = skip_check[:result] + msg = skip_check[:message] + set_skip_rule(dst, sr, msg) unless sr.nil? # Save merge history dst.instance_variable_set(:@__merge_count, merge_count(dst) + 1)