From 836475797aa1e882922f1a8d8af87fe848089a2d 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 df7a0f4..57aa784 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");