From: Joel Rosdahl Date: Wed, 8 Jul 2020 18:38:11 +0000 (+0200) Subject: Make “misc/format-files --check” exit with error code on error X-Git-Tag: v4.0~339 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6590662718ce46c6e8b2202432d9cd1e534dcd52;p=thirdparty%2Fccache.git Make “misc/format-files --check” exit with error code on error Regression in ee332b44a098f8603c05a25e09168b6b5b9c96ae. (cherry picked from commit ea5379c6e8a39605d71b52d01c4244ea8aeeae48) --- diff --git a/misc/format-files b/misc/format-files index b9a2c2887..3a79f7f6d 100755 --- a/misc/format-files +++ b/misc/format-files @@ -42,6 +42,7 @@ for file in "$@"; do fi if [ -n "$check" ]; then + status=1 echo "Error: $file not formatted with clang-format" echo 'Run "make format" or apply this diff:' git diff $cf_color --no-index "$file" "$tmp_file" \