Skip to content

Commit dc0d779

Browse files
authored
chore: exit 1 when build failed
1 parent 12b0bdd commit dc0d779

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

build.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,16 @@ BUILD_OPTIONS="-DCMAKE_BUILD_TYPE=${BUILD_TYPE}"
9292
mkdir -p "${BUILD_DIR}"
9393
cd "${BUILD_DIR}"
9494
if cmake .. ${BUILD_OPTIONS}; then
95-
make -j "${JOBS}" && cd "$CURDIR"
95+
if ! make -j "${JOBS}"; then
96+
exit 1
97+
fi
98+
cd "$CURDIR"
99+
96100
if [ "${TEST}" == "True" ]; then
97101
test
98102
cd "$CURDIR"
99103
fi
100104
else
101105
cd "$CURDIR"
102106
exit 1
103-
fi
107+
fi

0 commit comments

Comments
 (0)