gpg returns with non-zero exit status after successful run when using disable-scdaemon
Closed, ResolvedPublic

Description

If I add disable-scdaemon to ~/.gnupg/gpg-agent.conf, gpg still attempt to get the version of the smart-card daemon, producing a non-zero exit status, despite the action being successful.

Here is a way to reproduce:

  1. Add disable-scdaemon to ~/.gnupg/gpg-agent.conf.
  1. Restart the agent.
  1. Run:
$ echo "hola" | gpg --sign --armor; echo "exit: $?"

gpg: error getting version from 'scdaemon': Not supported
gpg: using "abdo.roig@gmail.com" as default secret key for signing
-----BEGIN PGP MESSAGE-----
[ ... ]
exit: 2

The exit status should be 0, as the signing was successful. Even better, it should not report an error from a missing scdaemon if the agent does not start it due to configuration.

I tested this with version 2.1.21 on Arch Linux.