Skip to content

Commit

Permalink
Ignore output of which
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
DWesl committed Jun 18, 2019
1 parent 5cf1ddc commit 8364757
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test.pl.in
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 8364757

Please sign in to comment.