From ed2a3f92e0cffab2bf06758af499e8e0d0b604ec Mon Sep 17 00:00:00 2001 From: ebbit1q Date: Mon, 26 Nov 2018 01:29:24 +0100 Subject: [PATCH] fix travis format checking again (#3451) Set the exit code properly, "$?" does not work after "if !". Move "set -e" to after format checks. --- .ci/travis-compile.sh | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.ci/travis-compile.sh b/.ci/travis-compile.sh index 8a529345..a3553f5f 100644 --- a/.ci/travis-compile.sh +++ b/.ci/travis-compile.sh @@ -2,8 +2,6 @@ # This script is to be used in .travis.yaml from the project root directory, do not use it from somewhere else. -set -e - # Read arguments while [[ "$@" ]]; do case "$1" in @@ -53,8 +51,11 @@ done # Check formatting using clang-format if [[ $CHECK_FORMAT ]]; then echo "Checking your code using clang-format..." - if ! diff="$(./clangify.sh --diff --cf-version)"; then - [[ $? == 1 ]] && cat <&2 + ;; + esac fi +set -e + # Setup ./servatrice/check_schema_version.sh mkdir -p build