Skip to content

Commit e2cf942

Browse files
committed
Might help if I tested that it worked.
Didn't see the TEST_SIGNATURE flag. I think the use of 2>&1 is portable. I belive Perl emulates simple redirection. Of course the test fails because it checks its signature against the distribution, which has changed. I'll leave that to the maintainers to take care of.
1 parent 49d7a7d commit e2cf942

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/Module/Signature.pm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,8 @@ sub _which_gpg {
197197
return $which_gpg if $which_gpg;
198198

199199
for my $gpg_bin ('gpg', 'gpg2', 'gnupg', 'gnupg2') {
200-
if( can_run($gpg_bin) ) {
200+
my $version = `$gpg_bin --version 2>&1`;
201+
if( $version && $version =~ /GnuPG/ ) {
201202
$which_gpg = $gpg_bin;
202203
return $which_gpg;
203204
}
@@ -215,7 +216,7 @@ sub _verify_gpg {
215216
my $gpg = _which_gpg();
216217
my @quiet = $Verbose ? () : qw(-q --logger-fd=1);
217218
my @cmd = (
218-
qw($gpg --verify --batch --no-tty), @quiet, ($KeyServer ? (
219+
$gpg, qw(--verify --batch --no-tty), @quiet, ($KeyServer ? (
219220
"--keyserver=$keyserver",
220221
($AutoKeyRetrieve and $version ge '1.0.7')
221222
? '--keyserver-options=auto-key-retrieve'

0 commit comments

Comments
 (0)