summaryrefslogtreecommitdiffstats
path: root/account.c
diff options
context:
space:
mode:
authorRocco Rutte <pdmef@gmx.net>2009-07-01 18:13:34 -0700
committerRocco Rutte <pdmef@gmx.net>2009-07-01 18:13:34 -0700
commit96b71b6c039df20cf65a3049821bee7ed6cb6208 (patch)
tree4a5ac6e097d500e99ea6af454957c13127914b62 /account.c
parent168451cd5a3fbce66db40c34dead9fbdf76a6ed6 (diff)
Make getuser/pass abort if input is required in batch mode.
Replaces [0a3de4d9a009]. See #3289.
Diffstat (limited to 'account.c')
-rw-r--r--account.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/account.c b/account.c
index b305f788..f7389914 100644
--- a/account.c
+++ b/account.c
@@ -155,6 +155,8 @@ int mutt_account_getuser (ACCOUNT* account)
else if ((account->type == M_ACCT_TYPE_POP) && PopUser)
strfcpy (account->user, PopUser, sizeof (account->user));
#endif
+ else if (option (OPTNOCURSES))
+ return -1;
/* prompt (defaults to unix username), copy into account->user */
else
{
@@ -215,6 +217,8 @@ int mutt_account_getpass (ACCOUNT* account)
else if ((account->type == M_ACCT_TYPE_SMTP) && SmtpPass)
strfcpy (account->pass, SmtpPass, sizeof (account->pass));
#endif
+ else if (option (OPTNOCURSES))
+ return -1;
else
{
snprintf (prompt, sizeof (prompt), _("Password for %s@%s: "),