summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgregor herrmann <gregoa@debian.org>2022-07-29 00:13:53 +0200
committergregor herrmann <gregoa@debian.org>2022-07-29 00:13:53 +0200
commitd5591bdbfa33260429f7d0d9f332e121a51554ec (patch)
tree27c39848b97a7d206c1ca50826ddd8255f160770
parent5842d9c3197adff498d2a87a4ca75f1c723c9e89 (diff)
Add stdin handler to _version sub
Origin: vendor Bug: https://github.com/bestpractical/gnupg-interface/issues/8 Bug-Debian: https://bugs.debian.org/1016125 Last-Update: 2022-07-29 Gbp-Pq: Name version-stdin.patch
-rw-r--r--lib/GnuPG/Interface.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/GnuPG/Interface.pm b/lib/GnuPG/Interface.pm
index 49d3104..31a9a34 100644
--- a/lib/GnuPG/Interface.pm
+++ b/lib/GnuPG/Interface.pm
@@ -821,7 +821,8 @@ sub _version {
my ( $self ) = @_;
my $out = IO::Handle->new;
- my $handles = GnuPG::Handles->new( stdout => $out );
+ my $in = IO::Handle->new;
+ my $handles = GnuPG::Handles->new( stdout => $out, stdin => $in );
my $pid = $self->wrap_call( commands => [ '--no-options', '--version' ], handles => $handles );
my $line = $out->getline;
$line =~ /(\d+\.\d+\.\d+)/;