From ea7a05301702c4e46755e4f8891c3cb180556b95 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Mon, 17 Jun 2019 19:15:07 -0400 Subject: [PATCH] Ignore output of ```which``` My system produces an error message when ```which``` fails to find an executable. I would like to produce no output for the routine parts of a test failure message. --- test.pl.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test.pl.in b/test.pl.in index 3a3f730..f91d8d3 100755 --- a/test.pl.in +++ b/test.pl.in @@ -28,9 +28,9 @@ sub assert_produces_correct_output { my $diffResult = `diff $compared 2>&1`; if ($diffResult ne '') { - if (`which kdiff3`) { + if (`which kdiff3 2>/dev/null`) { system("kdiff3 $compared"); - } elsif (!$ENV{CI} && `which vimdiff`) { + } elsif (!$ENV{CI} && `which vimdiff 2>/dev/null`) { system("vimdiff $compared"); } else { system("diff -u $compared");