From 90c08ed11332b766769b2e5ba114fb7ecb34e401 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 bde31b3c03d..21c92fe60d3 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 = get_new_node('replica'); -- 2.39.5