From f920f7e799c587228227ec94356c760e3f3d5f2b Mon Sep 17 00:00:00 2001 From: Andrew Dunstan Date: Wed, 8 Dec 2021 10:21:35 -0500 Subject: [PATCH] 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. --- src/bin/pg_basebackup/t/010_pg_basebackup.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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'); -- 2.39.5