summaryrefslogtreecommitdiff
path: root/lib/GnuPG
diff options
context:
space:
mode:
authorAaron Trevena <aaron@aarontrevena.co.uk>2020-05-05 14:42:36 +0100
committersunnavy <sunnavy@bestpractical.com>2020-05-13 03:38:31 +0800
commit507904cd216eff115d74fdf41bfa870e454f8357 (patch)
tree9466d5ecd07aa404d97269c79c51b54d667c9091 /lib/GnuPG
parentdbe357c4341deb6d41f9ef7a574f7acb7d38a7fc (diff)
Fix check for passing passphrase
Diffstat (limited to 'lib/GnuPG')
-rw-r--r--lib/GnuPG/Interface.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/GnuPG/Interface.pm b/lib/GnuPG/Interface.pm
index 889a12f..b9be5bb 100644
--- a/lib/GnuPG/Interface.pm
+++ b/lib/GnuPG/Interface.pm
@@ -100,7 +100,7 @@ sub wrap_call( $% ) {
$self->passphrase("\n") unless $self->passphrase();
my $needs_passphrase_handled
- = ( $self->passphrase() and not $handles->passphrase() ) ? 1 : 0;
+ = ( $self->passphrase() =~ m/\S/ and not $handles->passphrase() ) ? 1 : 0;
if ($needs_passphrase_handled) {
$handles->passphrase( IO::Handle->new() );