]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Make “misc/format-files --check” exit with error code on error
authorJoel Rosdahl <joel@rosdahl.net>
Wed, 8 Jul 2020 18:38:11 +0000 (20:38 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Wed, 8 Jul 2020 18:38:50 +0000 (20:38 +0200)
Regression in ee332b44a098f8603c05a25e09168b6b5b9c96ae.

(cherry picked from commit ea5379c6e8a39605d71b52d01c4244ea8aeeae48)

misc/format-files

index b9a2c2887edd03dce1b149ee333e32dd1a65688c..3a79f7f6d7ec499ac2c429d050d84a8a782a6169 100755 (executable)
@@ -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" \