When running `arc diff` on a newly added file,
utils/arcanist/clang-format.sh is run. For new files there is no change,
but the script will bail. Without the use of the -f flag, we get
interactive prompts like:
rm: remove write-protected regular file '/tmp/tmp.ReMybrBw35'?
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D148555
cleanup() {
rc=$?
- rm "${formatted_file}" "${original_file}"
+ rm -f "${formatted_file}" "${original_file}"
exit ${rc}
}
trap 'cleanup' INT HUP QUIT TERM EXIT