113498266Sopenharmony_ci--- 213498266Sopenharmony_cic: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 313498266Sopenharmony_ciSPDX-License-Identifier: curl 413498266Sopenharmony_ciLong: remove-on-error 513498266Sopenharmony_ciHelp: Remove output file on errors 613498266Sopenharmony_ciCategory: curl 713498266Sopenharmony_ciAdded: 7.83.0 813498266Sopenharmony_ciMulti: boolean 913498266Sopenharmony_ciSee-also: 1013498266Sopenharmony_ci - fail 1113498266Sopenharmony_ciExample: 1213498266Sopenharmony_ci - --remove-on-error -o output $URL 1313498266Sopenharmony_ci--- 1413498266Sopenharmony_ci 1513498266Sopenharmony_ci# `--remove-on-error` 1613498266Sopenharmony_ci 1713498266Sopenharmony_ciWhen curl returns an error when told to save output in a local file, this 1813498266Sopenharmony_cioption removes that saved file before exiting. This prevents curl from 1913498266Sopenharmony_cileaving a partial file in the case of an error during transfer. 2013498266Sopenharmony_ci 2113498266Sopenharmony_ciIf the output is not a regular file, this option has no effect. 22