[Bps-public-commit] GnuPG-Interface branch, work-with-both-gnupgs, updated. 0.52-30-gb6762c9

Brian Duggan brian at bestpractical.com
Wed Mar 28 17:00:32 EDT 2018


The branch, work-with-both-gnupgs has been updated
       via  b6762c9f39a977bfe1e1cf99d29708494d71f7ab (commit)
      from  43a708122e272aef0f059dc79f6098261ae66e81 (commit)

Summary of changes:
 t/000_setup.t | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit b6762c9f39a977bfe1e1cf99d29708494d71f7ab
Author: Brian C. Duggan <brian at bestpractical.com>
Date:   Tue Mar 27 20:18:48 2018 -0400

    Use GNUPGHOME instead of --homedir when calling gpgconf in test setup
    
    The test setup also used --homedir when it ran gpgconf. This change
    updates it to use GNUPGHOME.

diff --git a/t/000_setup.t b/t/000_setup.t
index e133ec5..e1ffcf1 100644
--- a/t/000_setup.t
+++ b/t/000_setup.t
@@ -22,8 +22,11 @@ TEST
     # In classic gpg, gpgconf cannot kill gpg-agent. But these tests
     # will not start an agent when using classic gpg. For modern gpg,
     # reset the state of any long-lived gpg-agent, ignoring errors:
-    system('gpgconf', '--homedir', $homedir, '--quiet', '--kill', 'gpg-agent') if $gnupg->cmp_version($gnupg->version, '2.1') >= 0;
-
+    if ($gnupg->cmp_version($gnupg->version, '2.1') >= 0) {
+	$ENV{'GNUPGHOME'} = $homedir;
+	system('gpgconf', '--quiet', '--kill', 'gpg-agent');
+	delete $ENV{'GNUPGHOME'};
+    }
     reset_handles();
 
     my $pid = $gnupg->import_keys(command_args => [ 'test/public_keys.pgp', 'test/secret_keys.pgp', 'test/new_secret.pgp' ],

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


More information about the Bps-public-commit mailing list