From b4d6c42b6c4926220c11b7c2a564fe3499654518 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Volkert=20de=20Buisonj=C3=A9?= Date: Tue, 20 Aug 2024 00:19:38 +0200 Subject: [PATCH] ci: fix DOS error code propagation bug by exporting environment variable, so the if-statement further below has it in its context --- .github/workflows/02-pr-checks.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/02-pr-checks.yml b/.github/workflows/02-pr-checks.yml index 422b72b..4d9a655 100644 --- a/.github/workflows/02-pr-checks.yml +++ b/.github/workflows/02-pr-checks.yml @@ -78,10 +78,10 @@ jobs: /usr/local/bin/run_cicd_dos.sh # Propagate error code from DOS test or exit with error code 254 if the exit code file is missing echo step1 - dos_exit_code=$(cat test/exitcode.txt || echo 254) + export dos_exit_code=$(cat test/exitcode.txt || echo 254) echo DOS exit code was $dos_exit_code echo step2 - if [ $dos_exit_code -ne 0 ]; then exit $dos_exit_code; fi + sh -c 'if [ $dos_exit_code -ne 0 ]; then exit $dos_exit_code; fi' echo step3 wget -P /tmp https://aluigi.altervista.org/mytoolz/dtmf2num.zip echo "187d43e4d57535da3386eee3accdbcd09526378e3258db7f1bd5afccd0c64360 /tmp/dtmf2num.zip" | sha256sum -c