From 0994e6964b21f619ae1db83449769aaace8129a6 Mon Sep 17 00:00:00 2001 From: Peter Elliott Date: Mon, 24 Oct 2022 23:38:51 -0600 Subject: [PATCH] Ports: Fix return statuses with new buildsteps previously every buildstep would return a success error code. As a result, all the steps would run even if previous steps failed. I've also added a red status message when this happens. --- Ports/.port_include.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh index 7363b99260b..bf9e58a0095 100755 --- a/Ports/.port_include.sh +++ b/Ports/.port_include.sh @@ -18,6 +18,11 @@ buildstep() { else "$@" fi 2>&1 | sed $'s|^|\x1b[34m['"${port}/${buildstep_name}"$']\x1b[39m |' + local return_code=${PIPESTATUS[0]} + if [ ${return_code} != 0 ]; then + echo -e "\x1b[1;31mError in step ${port}/${buildstep_name} (status=${return_code})\x1b[0m" + fi + return ${return_code} } buildstep_intro() {