From 22944c33b8197d584daa24db436123aceaed676d Mon Sep 17 00:00:00 2001 From: Will Dower Date: Fri, 25 Feb 2022 16:06:15 -0500 Subject: [PATCH] fixed bug in --no-diff behavior Signed-off-by: Will Dower --- lib/inspec/utils/run_data_filters.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/inspec/utils/run_data_filters.rb b/lib/inspec/utils/run_data_filters.rb index d7e49c744..3dec1239d 100644 --- a/lib/inspec/utils/run_data_filters.rb +++ b/lib/inspec/utils/run_data_filters.rb @@ -64,8 +64,8 @@ module Inspec p[:controls]&.each do |c| c[:results]&.each do |r| next unless r[:message] # :message only set on failure - - pos = r[:message].index("\n\nDiff:") + #require 'pry'; binding.pry + pos = r[:message].index(/\n{1,2}Diff.*:/) next unless pos # Only textual tests get Diffs r[:message] = r[:message].slice(0, pos)