mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-18 14:17:03 +01:00
gpg: Print a hint for --batch mode and --delete-secret-key.
* g10/delkey.c: Include shareddefs.h. (delete_keys): Print a hint. -- The option --yes has some side-effects so it is not desirable to use it automatically. The code in master (2.3) has special treatment of confirm messages and thus this patch is only for 2.2. GnuPG-bug-id: 4667 Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
25dc0e5b1e
commit
fbe3184752
@ -38,6 +38,7 @@
|
||||
#include "filter.h"
|
||||
#include "../common/ttyio.h"
|
||||
#include "../common/i18n.h"
|
||||
#include "../common/shareddefs.h"
|
||||
#include "call-agent.h"
|
||||
|
||||
|
||||
@ -368,6 +369,11 @@ delete_keys (ctrl_t ctrl, strlist_t names, int secret, int allow_both)
|
||||
{
|
||||
log_error ("%s: delete key failed: %s\n",
|
||||
names->d, gpg_strerror (err));
|
||||
if (gpg_err_code (err) == GPG_ERR_NO_PIN_ENTRY
|
||||
&& opt.batch && secret
|
||||
&& opt.pinentry_mode == PINENTRY_MODE_LOOPBACK)
|
||||
log_info ("(try option \"--yes\" to delete anyway)\n");
|
||||
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user