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

gpg: In batch mode, delete-secret-key is not okay without --yes.

* g10/delkey.c (do_delete_key): Emit an error when not --yes.

--

GnuPG-bug-id: 4667
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2020-11-10 14:08:24 +09:00
parent 9854369a72
commit f9bbc75163

View File

@ -151,7 +151,12 @@ do_delete_key (ctrl_t ctrl, const char *username, int secret, int force,
if (opt.batch && exactmatch)
okay++;
{
if (!opt.answer_yes && secret)
log_error(_("can't do this in batch mode without \"--yes\"\n"));
else
okay++;
}
else if (opt.batch && secret)
{
log_error(_("can't do this in batch mode\n"));