aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2021-12-08 10:21:35 -0500
committerAndrew Dunstan <andrew@dunslane.net>2021-12-08 10:24:07 -0500
commitf920f7e799c587228227ec94356c760e3f3d5f2b (patch)
treebed68288639a8cbd9ed6d28ebbae27a78e548a2a
parent815d61fcd485e8c60dba22988bf5a90fc12df32d (diff)
downloadpostgresql-f920f7e799c587228227ec94356c760e3f3d5f2b.tar.gz
postgresql-f920f7e799c587228227ec94356c760e3f3d5f2b.zip
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.
-rw-r--r--src/bin/pg_basebackup/t/010_pg_basebackup.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/pg_basebackup/t/010_pg_basebackup.pl b/src/bin/pg_basebackup/t/010_pg_basebackup.pl
index 89f45b77a34..a7ded069447 100644
--- a/src/bin/pg_basebackup/t/010_pg_basebackup.pl
+++ b/src/bin/pg_basebackup/t/010_pg_basebackup.pl
@@ -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');