Skip to content

Commit c5be035

Browse files
committed
apply flag to catch bash error to all bash loops in makefile
1 parent 3667334 commit c5be035

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ init:
2222
build: convert
2323
buildall: convertall
2424

25+
# 'set -e' is used to cause the bash loop to immediately exit on a failure.
26+
# without this, the github actions workflow can succeed even if commands in these
27+
# bash loops (installing packages, executing notebooks, converting notebooks) fail
2528
execute:
29+
set -e; \
2630
i=0; \
2731
_paths=($(MODIFIED_RQT_PATHS)); \
2832
for notebook in ${MODIFIED_NOTEBOOKS}; do \
@@ -44,6 +48,7 @@ convert:
4448
done
4549

4650
executeall:
51+
set -e; \
4752
i=0; \
4853
_paths=(${ALL_RQT_PATHS}); \
4954
for notebook in ${ALL_NOTEBOOKS}; do \
@@ -54,6 +59,7 @@ executeall:
5459
done
5560

5661
convertall:
62+
set -e; \
5763
i=0; \
5864
_paths=($(ALL_RQT_PATHS)); \
5965
for notebook in ${ALL_NOTEBOOKS}; do \

0 commit comments

Comments
 (0)