summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2024-07-05 09:14:47 +0200
committerWerner Koch <wk@gnupg.org>2024-07-05 09:14:47 +0200
commitca3b8d25417ec95d389e05605f956a534465ad99 (patch)
tree0a18f8930cf5a666b50cebc29d70bd81c5061ad9
parenttpm2d: Fix key import. (diff)
downloadgnupg2-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.c9
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);