curl: add --remove-on-error

If a transfer returns an error, using this option makes curl remove the
leftover downloded (partial) local file before exiting.

Added test 376 to verify

Closes #8503
This commit is contained in:
Daniel Stenberg 2022-02-24 10:30:10 +01:00
parent 7b0fd39db2
commit 08a96c6e4e
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
9 changed files with 93 additions and 2 deletions

View file

@ -574,6 +574,9 @@ const struct helptxt helptext[] = {
{"-R, --remote-time",
"Set the remote file's time on the local output",
CURLHELP_OUTPUT},
{" --remove-on-error",
"Remove output file on errors",
CURLHELP_CURL},
{"-X, --request <method>",
"Specify request method to use",
CURLHELP_CONNECTION},