1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

gpg: Fix the previous commit.

* g10/delkey.c (do_delete_key): Fix the condition for the error.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2020-11-11 09:13:13 +09:00
parent f9bbc75163
commit dd2703096f

View File

@ -38,6 +38,7 @@
#include "filter.h"
#include "../common/ttyio.h"
#include "../common/i18n.h"
#include "../common/shareddefs.h"
#include "call-agent.h"
@ -152,7 +153,8 @@ do_delete_key (ctrl_t ctrl, const char *username, int secret, int force,
if (opt.batch && exactmatch)
{
if (!opt.answer_yes && secret)
if (secret && opt.pinentry_mode == PINENTRY_MODE_LOOPBACK
&& !opt.answer_yes)
log_error(_("can't do this in batch mode without \"--yes\"\n"));
else
okay++;