[Rt-commit] r18387 - rt/3.8/trunk/lib/RT/Crypt

ruz at bestpractical.com ruz at bestpractical.com
Fri Feb 13 22:05:51 EST 2009


Author: ruz
Date: Fri Feb 13 22:05:51 2009
New Revision: 18387

Modified:
   rt/3.8/trunk/lib/RT/Crypt/GnuPG.pm

Log:
* on some systems gpg --version exits with code 2 even when it's 100% functional

Modified: rt/3.8/trunk/lib/RT/Crypt/GnuPG.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/Crypt/GnuPG.pm	(original)
+++ rt/3.8/trunk/lib/RT/Crypt/GnuPG.pm	Fri Feb 13 22:05:51 2009
@@ -2365,7 +2365,11 @@
         );
         return 0;
     }
-    if ( $? ) {
+
+# on some systems gpg exits with code 2, but still 100% functional,
+# it's general error system error or incorrect command, command is correct,
+# but there is no way to get actuall error
+    if ( $? && ($? >> 8) != 2 ) {
         $RT::Logger->debug(
             "Probe for GPG failed."
             ." Process exitted with code ". ($? >> 8)


More information about the Rt-commit mailing list