aboutsummaryrefslogtreecommitdiff
path: root/src/tool_operate.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-11-12 14:19:29 +0100
committerDaniel Stenberg <daniel@haxx.se>2016-11-14 08:35:40 +0100
commitf82bbe01c8835b8788c69f05362bb789766473cd (patch)
treee5c8bd5b8b10e24c350d0cfa830875f53cbc31ca /src/tool_operate.c
parentf682156a4fc6c43fb38db4abda49b9a1bc1ed368 (diff)
curl: add --fail-early
Exit with an error on the first transfer error instead of continuing to do the rest of the URLs. Discussion: https://curl.haxx.se/mail/archive-2016-11/0038.html
Diffstat (limited to 'src/tool_operate.c')
-rw-r--r--src/tool_operate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c
index d467b0df5..c44f2141c 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -1805,9 +1805,9 @@ static CURLcode operate_do(struct GlobalConfig *global,
urlnode->flags = 0;
/*
- ** Bail out upon critical errors
+ ** Bail out upon critical errors or --fail-early
*/
- if(is_fatal_error(result))
+ if(is_fatal_error(result) || (result && global->fail_early))
goto quit_curl;
} /* for-loop through all URLs */