mirror of
https://github.com/curl/curl.git
synced 2026-08-26 00:13:34 +03:00
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
This commit is contained in:
parent
f682156a4f
commit
f82bbe01c8
6 changed files with 68 additions and 6 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue