summaryrefslogtreecommitdiff
path: root/src/tool_getparam.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tool_getparam.c')
-rw-r--r--src/tool_getparam.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
index 812ce7fd9..d187643a7 100644
--- a/src/tool_getparam.c
+++ b/src/tool_getparam.c
@@ -280,6 +280,7 @@ static const struct LongShort aliases[]= {
{"fa", "fail-early", ARG_BOOL},
{"fb", "styled-output", ARG_BOOL},
{"fc", "mail-rcpt-allowfails", ARG_BOOL},
+ {"fd", "fail-with-body", ARG_BOOL},
{"F", "form", ARG_STRING},
{"Fs", "form-string", ARG_STRING},
{"g", "globoff", ARG_BOOL},
@@ -1766,8 +1767,17 @@ ParameterError getparameter(const char *flag, /* f or -long-flag */
case 'c': /* --mail-rcpt-allowfails */
config->mail_rcpt_allowfails = toggle;
break;
+ case 'd': /* --fail-with-body */
+ config->failwithbody = toggle;
+ break;
default: /* --fail (hard on errors) */
config->failonerror = toggle;
+ break;
+ }
+ if(config->failonerror && config->failwithbody) {
+ errorf(config->global, "You must select either --fail or "
+ "--fail-with-body, not both.\n");
+ return PARAM_BAD_USE;
}
break;
case 'F':