mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-26 23:21:11 +00:00
[arcanist] rm -f for write protected temp files
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
This commit is contained in:
parent
10c17c97eb
commit
b3dd9041e6
@ -36,7 +36,7 @@ cp -p "${src_file}" "${formatted_file}"
|
||||
|
||||
cleanup() {
|
||||
rc=$?
|
||||
rm "${formatted_file}" "${original_file}"
|
||||
rm -f "${formatted_file}" "${original_file}"
|
||||
exit ${rc}
|
||||
}
|
||||
trap 'cleanup' INT HUP QUIT TERM EXIT
|
||||
|
Loading…
Reference in New Issue
Block a user