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:
- Add disable-scdaemon to ~/.gnupg/gpg-agent.conf.
- Restart the agent.
$ echo "hola" | gpg --sign --armor; echo "exit: $?" gpg: error getting version from 'scdaemon': Not supported gpg: using "email@example.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.