[Pgp-tools-commit] r727 - trunk/caff
Guilhem Moulin
guilhem-guest at moszumanska.debian.org
Fri Nov 7 17:40:23 UTC 2014
Author: guilhem-guest
Date: 2014-11-07 17:40:21 +0000 (Fri, 07 Nov 2014)
New Revision: 727
Modified:
trunk/caff/caff
Log:
caff: properly die when gpg(1) exits with a non-zero status code.
Modified: trunk/caff/caff
===================================================================
--- trunk/caff/caff 2014-11-07 17:40:14 UTC (rev 726)
+++ trunk/caff/caff 2014-11-07 17:40:21 UTC (rev 727)
@@ -589,7 +589,9 @@
unless grep { $_ eq $CONFIG{'also-lsign-in-gnupghome'} } qw/auto ask no/;
# ensure there is a working gpg-agent if $CONFIG{'also-lsign-in-gnupghome'} is 'auto'
$CONFIG{'also-lsign-in-gnupghome'} = 'ask'
- if $CONFIG{'also-lsign-in-gnupghome'} eq 'auto' and $CONFIG{'gpg-sign-type'} !~ /l/ and system qw/gpg-agent -q/;
+ if $CONFIG{'also-lsign-in-gnupghome'} eq 'auto' and
+ $CONFIG{'gpg-sign-type'} !~ /l/ and
+ system (qw/gpg-agent -q/) == 0;
$CONFIG{'show-photos'} //= 0;
};
@@ -1500,7 +1502,7 @@
push @command, split ' ', $CONFIG{'gpg-sign-args'} || "";
print join(' ', @command),"\n";
system @command;
- die "$CONFIG{'gpg-sign'} exited with value $?.\n" if 0 < $? and $? <= 2;
+ die "system $command[0] failed: $?.\n" if $?;
};
};
@@ -1640,7 +1642,7 @@
push @command, split ' ', $CONFIG{'gpg-sign-args'} || "";
print join(' ', @command),"\n";
system @command;
- die "$CONFIG{'gpg-sign'} exited with value $?.\n" if 0 < $? and $? <= 2;
+ die "system $command[0] failed: $?.\n" if $?;
};
}
else {
More information about the Pgp-tools-commit
mailing list