Check that we have a working tar before trying to use it

Issue exposed by commit edc2332550 and the buildfarm.

Backpatch to release 14 where this usage started.
This commit is contained in:
Andrew Dunstan 2021-12-08 10:21:35 -05:00
parent 815d61fcd4
commit f920f7e799
No known key found for this signature in database
GPG Key ID: 99FA7FCB59FC3B81
1 changed files with 2 additions and 1 deletions

View File

@ -268,7 +268,8 @@ SKIP:
{
my $tar = $ENV{TAR};
skip "no tar program available", 1
if (!defined $tar || $tar eq '');
if (!defined $tar || $tar eq ''
|| system_log($tar, '--version') != 0);
my $node2 = PostgreSQL::Test::Cluster->new('replica');