In PostgresNode.pm, don't pass SQL to psql on the command line
The Msys shell mangles certain patterns in its command line, so avoid handing arbitrary SQL to psql on the command line and instead use IPC::Run's redirection facility for stdin. This pattern is already mostly whats used, but query_poll_until() was not doing the right thing. Problem discovered on the buildfarm when a new TAP test failed on msys.
This commit is contained in:
parent
d9525c46c8
commit
066535d411
@ -1360,8 +1360,9 @@ sub poll_query_until
|
||||
while ($attempts < $max_attempts)
|
||||
{
|
||||
my $cmd =
|
||||
[ 'psql', '-XAt', '-c', $query, '-d', $self->connstr($dbname) ];
|
||||
my $result = IPC::Run::run $cmd, '>', \$stdout, '2>', \$stderr;
|
||||
[ 'psql', '-XAt', '-d', $self->connstr($dbname) ];
|
||||
my $result = IPC::Run::run $cmd, '<', \$query,
|
||||
'>', \$stdout, '2>', \$stderr;
|
||||
|
||||
$stdout =~ s/\r\n/\n/g if $Config{osname} eq 'msys';
|
||||
chomp($stdout);
|
||||
|
Loading…
x
Reference in New Issue
Block a user