Skip to content

Commit 84abd1e

Browse files
committed
fix: function now stop on errors
1 parent 716a062 commit 84abd1e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ $(if $(filter $(MAKE_DEBUG),true),\
6868
${1} \
6969
, \
7070
$(if $(filter $(MAKE_STOP_ON_ERRORS),true),\
71-
@${1} > /dev/null && printf " 🤞 ${1} ✅\n" || (printf " ${1} ❌ 🖕\n"; exit 1) \
71+
$(if $(findstring >, $1),\
72+
@${1} 2>/dev/null && printf " 🤞 ${1} ✅\n" || (printf " ${1} ❌ 🖕\n"; exit 1) \
73+
, \
74+
@${1} > /dev/null && printf " 🤞 ${1} ✅\n" || (printf " ${1} ❌ 🖕\n"; exit 1) \
75+
) \
7276
, \
7377
$(if $(findstring >, $1),\
7478
@${1} 2>/dev/null; _exit_code=$$?; if [ $$_exit_code -eq 0 ]; then printf " 🤞 ${1} ✅\n"; else printf " ${1} ❌ 🖕\n"; fi; exit $$_exit_code \

0 commit comments

Comments
 (0)