ci: ugly bashism to make clang-format-check fail properly

pull/153/head
matejcik 5 years ago
parent f8a1f47e67
commit 0df2ef10a1

@ -1,7 +1,7 @@
#!/bin/sh
#!/bin/bash
error=0
for f in $*; do
changes=$(clang-format -output-replacements-xml "$f" | grep -c '^<replacement ')
changes=$(clang-format -output-replacements-xml "$f" | grep -c '^<replacement '; exit ${PIPESTATUS[0]})
if [ "$?" -ne "0" ]; then
echo "clang-format failed"
exit 1

Loading…
Cancel
Save