Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8bdd6f5

Browse files
committed
Use a more portable way to get the version string in PostgresNode
Older versions of perl on Windows don't like the list form of pipe open,and perlcritic doesn't like the string form of open, so we avoid bothwith a simpler formulation using qx{}.Per complaint from Amit Kapila.
1 parent413c1ef commit8bdd6f5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

‎src/test/perl/PostgresNode.pm

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,10 +1248,8 @@ sub _set_pg_version
12481248
local%ENV =$self->_get_env();
12491249

12501250
# We only want the version field
1251-
openmy$fh,"-|",$pg_config,"--version"
1252-
or BAIL_OUT("$pg_config failed:$!");
1253-
my$version_line = <$fh>;
1254-
close$fhordie;
1251+
my$version_line =qx{$pg_config --version};
1252+
BAIL_OUT("$pg_config failed:$!")if$?;
12551253

12561254
$self->{_pg_version} = PostgresVersion->new($version_line);
12571255

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp