From 4a828045aa3f4d85c012deda9bd953025af1291d Mon Sep 17 00:00:00 2001
From: Andrew Dunstan <andrew@dunslane.net>
Date: Mon, 13 Jun 2022 18:16:33 -0400
Subject: [PATCH 1/2] Allow option argument for config_data method to be
 missing

If the argument is missing the current code gets a nasty and cryptic
error message from IPC::Run. Instead we allow the argument to be missing
and in this case all the config lines are returned to the caller.
---
 src/test/perl/PostgreSQL/Test/Cluster.pm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm b/src/test/perl/PostgreSQL/Test/Cluster.pm
index c8c7bc5045..d6c485545b 100644
--- a/src/test/perl/PostgreSQL/Test/Cluster.pm
+++ b/src/test/perl/PostgreSQL/Test/Cluster.pm
@@ -348,18 +348,18 @@ sub pg_version
 =item $node->config_data($option)
 
 Return a string holding configuration data from pg_config, with $option
-being the option switch used with the pg_config command.
+(if supplied) being the option switch used with the pg_config command.
 
 =cut
 
 sub config_data
 {
-	my ($self, $option) = @_;
+	my $self = shift;
 	local %ENV = $self->_get_env();
 
 	my ($stdout, $stderr);
 	my $result =
-	  IPC::Run::run [ $self->installed_command('pg_config'), $option ],
+	  IPC::Run::run [ $self->installed_command('pg_config'), @_ ],
 	  '>', \$stdout, '2>', \$stderr
 	  or die "could not execute pg_config";
 	chomp($stdout);
-- 
2.25.1

