6e3fb6
From 7d4d5e32bcd9b75f7bf70a395938a48ca4a06d25 Mon Sep 17 00:00:00 2001
6e3fb6
From: Andreas Koenig <andk@cpan.org>
6e3fb6
Date: Mon, 10 Jan 2022 21:47:30 +0100
6e3fb6
Subject: [PATCH 1/2] s/gpg/$gpg/ in system, add quotes where needed
6e3fb6
6e3fb6
- thanks to Tomas Hoger for spotting the missing sigil
6e3fb6
---
6e3fb6
 lib/CPAN/Distribution.pm | 3 ++-
6e3fb6
 1 file changed, 2 insertions(+), 1 deletion(-)
6e3fb6
6e3fb6
diff --git a/lib/CPAN/Distribution.pm b/lib/CPAN/Distribution.pm
6e3fb6
index b262b6f6..d837b8ad 100644
6e3fb6
--- a/lib/CPAN/Distribution.pm
6e3fb6
+++ b/lib/CPAN/Distribution.pm
6e3fb6
@@ -1551,9 +1551,10 @@ sub CHECKSUM_check_file {
6e3fb6
         }
6e3fb6
         my $tempfile = File::Spec->catfile($tempdir, "CHECKSUMS.$$");
6e3fb6
         unlink $tempfile; # ignore missing file
6e3fb6
+        my $devnull = File::Spec->devnull;
6e3fb6
         my $gpg = $CPAN::Config->{gpg} or
6e3fb6
             $CPAN::Frontend->mydie("Your configuration suggests that you do not have 'gpg' installed. This is needed to verify checksums with the config variable 'check_sigs' on. Please configure it with 'o conf init gpg'");
6e3fb6
-        my $system = "gpg --verify --batch --no-tty --output $tempfile $chk_file 2> /dev/null";
6e3fb6
+        my $system = qq{"$gpg" --verify --batch --no-tty --output "$tempfile" "$chk_file" 2> "/dev/null"};
6e3fb6
         0 == system $system or $CPAN::Frontend->mydie("gpg run was failing, cannot continue: $system");
6e3fb6
         open $fh, $tempfile or $CPAN::Frontend->mydie("Could not open $tempfile: $!");
6e3fb6
         local $/;
6e3fb6
-- 
6e3fb6
2.34.1
6e3fb6