fix(ci): fix formatting script

seems like big diffs weren't catched. Now we use ifne which checks if
the stdin isn't empty
This commit is contained in:
youben11
2021-12-31 11:37:13 +01:00
committed by rudy-6-4
parent e3ae6e9c06
commit 1183c9dc94
2 changed files with 3 additions and 3 deletions

View File

@@ -26,7 +26,7 @@ jobs:
with:
submodules: true
- name: Format with clang-format
run: .github/workflows/scripts/format_cpp.sh
run: sudo apt install moreutils && .github/workflows/scripts/format_cpp.sh
CheckLicense:
runs-on: ubuntu-latest

View File

@@ -9,6 +9,6 @@ then
fi
# show changes if any
git diff
git --no-pager diff
# fail if there is a diff, success otherwise
! ( git diff | grep -q ^ ) || exit 1
git diff | ifne exit 1