blob: 375d4c919544f16e28b5be0f4046adeaedf5d130 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001Long: fail-early
2Help: Fail on first transfer error, do not continue
3Added: 7.52.0
4---
5Fail and exit on the first detected transfer error.
6
7When curl is used to do multiple transfers on the command line, it will
8attempt to operate on each given URL, one by one. By default, it will ignore
9errors if there are more URLs given and the last URL's success will determine
10the error code curl returns. So early failures will be "hidden" by subsequent
11successful transfers.
12
13Using this option, curl will instead return an error on the first transfer
14that fails, independent of the amount of URLs that are given on the command
15line. This way, no transfer failures go undetected by scripts and similar.
16
17This option is global and does not need to be specified for each use of --next.
18
19This option does not imply --fail, which causes transfers to fail due to the
20server's HTTP status code. You can combine the two options, however note --fail
21is not global and is therefore contained by --next.