1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-11-09 21:28:51 +01:00

gpgconf: Fix error in --show-versions due to recent spawn changes.

* tools/gpgconf.c (show_versions_via_dirmngr): Fail only on
exitcode!=0.
This commit is contained in:
Werner Koch 2024-07-05 09:14:47 +02:00
parent cf3cec982d
commit ca3b8d2541
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -1347,10 +1347,13 @@ show_versions_via_dirmngr (estream_t fp)
int exitcode; int exitcode;
gnupg_process_ctl (proc, GNUPG_PROCESS_GET_EXIT_ID, &exitcode); gnupg_process_ctl (proc, GNUPG_PROCESS_GET_EXIT_ID, &exitcode);
if (exitcode)
{
log_error ("running %s failed (exitcode=%d): %s\n", log_error ("running %s failed (exitcode=%d): %s\n",
pgmname, exitcode, gpg_strerror (err)); pgmname, exitcode, gpg_strerror (err));
es_fprintf (fp, "[error: can't get further info]\n"); es_fprintf (fp, "[error: can't get further info]\n");
} }
}
gnupg_process_release (proc); gnupg_process_release (proc);
xfree (line); xfree (line);
} }