[Rt-commit] rt branch, 4.4/set-gnupg-path-in-constructor, created. rt-4.4.4-137-gaa2a60adfc

Dianne Skoll dianne at bestpractical.com
Tue Sep 8 16:24:29 EDT 2020


The branch, 4.4/set-gnupg-path-in-constructor has been created
        at  aa2a60adfc523f2b974b5418752e822f6406e675 (commit)

- Log -----------------------------------------------------------------
commit aa2a60adfc523f2b974b5418752e822f6406e675
Author: Dianne Skoll <dianne at bestpractical.com>
Date:   Tue Sep 8 16:16:44 2020 -0400

    Set path to GnuPG binary in GnuPG::Interface constructor.
    
    RT ticket: https://rt.bestpractical.com/Ticket/Display.html?id=36623

diff --git a/lib/RT/Crypt/GnuPG.pm b/lib/RT/Crypt/GnuPG.pm
index 8ebfbf938e..988af8741a 100644
--- a/lib/RT/Crypt/GnuPG.pm
+++ b/lib/RT/Crypt/GnuPG.pm
@@ -333,8 +333,7 @@ sub CallGnuPG {
         %GnuPGOptions,
         %{ $args{Options} || {} },
     );
-    my $gnupg = GnuPG::Interface->new;
-    $gnupg->call( $self->GnuPGPath );
+    my $gnupg = GnuPG::Interface->new( call => $self->GnuPGPath );
     $gnupg->options->hash_init(
         _PrepareGnuPGOptions( %opt ),
     );
@@ -1848,7 +1847,6 @@ sub GnuPGPath {
 
 sub Probe {
     my $self = shift;
-    my $gnupg = GnuPG::Interface->new;
 
     my $bin = $self->GnuPGPath();
     unless ($bin) {
@@ -1878,7 +1876,7 @@ sub Probe {
         $self->GnuPGPath( $bin = $path );
     }
 
-    $gnupg->call( $bin );
+    my $gnupg = GnuPG::Interface->new( call => $bin );
     $gnupg->options->hash_init(
         _PrepareGnuPGOptions( RT->Config->Get('GnuPGOptions') )
     );

-----------------------------------------------------------------------


More information about the rt-commit mailing list