diff options
author | Werner Koch <wk@gnupg.org> | 2024-07-05 09:14:47 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2024-07-05 09:14:47 +0200 |
commit | ca3b8d25417ec95d389e05605f956a534465ad99 (patch) | |
tree | 0a18f8930cf5a666b50cebc29d70bd81c5061ad9 | |
parent | tpm2d: Fix key import. (diff) | |
download | gnupg2-ca3b8d25417ec95d389e05605f956a534465ad99.tar.xz gnupg2-ca3b8d25417ec95d389e05605f956a534465ad99.zip |
gpgconf: Fix error in --show-versions due to recent spawn changes.
* tools/gpgconf.c (show_versions_via_dirmngr): Fail only on
exitcode!=0.
-rw-r--r-- | tools/gpgconf.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/gpgconf.c b/tools/gpgconf.c index 1b9a9268f..697e9c903 100644 --- a/tools/gpgconf.c +++ b/tools/gpgconf.c @@ -1347,9 +1347,12 @@ show_versions_via_dirmngr (estream_t fp) int exitcode; gnupg_process_ctl (proc, GNUPG_PROCESS_GET_EXIT_ID, &exitcode); - log_error ("running %s failed (exitcode=%d): %s\n", - pgmname, exitcode, gpg_strerror (err)); - es_fprintf (fp, "[error: can't get further info]\n"); + if (exitcode) + { + log_error ("running %s failed (exitcode=%d): %s\n", + pgmname, exitcode, gpg_strerror (err)); + es_fprintf (fp, "[error: can't get further info]\n"); + } } gnupg_process_release (proc); xfree (line); |