Skip to content

Commit befc68c

Browse files
committed
chore: fail when one of the two fronend scripts fail
Signed-off-by: Ferdinand Thiessen <[email protected]>
1 parent 00e1264 commit befc68c

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

build/demi.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,25 @@ run_sequentially() {
3030
echo -e "\e[1;34m>> Running 'npm $COMMAND' for Vue 3 based frontend\e[0m"
3131
echo
3232
pushd "$FRONTEND"
33+
set +e
3334
npm $COMMAND
35+
STATUS=$?
36+
set -e
3437
popd
3538

3639
echo -e "\e[1;34m>> Running 'npm $COMMAND' for Vue 2 based frontend\e[0m"
3740
echo
3841
pushd "$FRONTEND_LEGACY"
3942
npm $COMMAND
4043
popd
41-
}
4244

45+
if [ $STATUS -ne 0 ]; then
46+
echo -e "\e[1;31m>> Vue 3 based frontend build failed\e[0m"
47+
exit $STATUS
48+
fi
49+
}
4350

51+
set -e
4452
if [ "--parallel" = "$1" ]; then
4553
build_command ${@:2}
4654
run_parallel

0 commit comments

Comments
 (0)