From 4db6933c1780ae66e75df4e376e4cdc483d256dc Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 4 Nov 2023 11:38:48 +0100 Subject: [PATCH] Do things differently --- .ci/phpstan.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.ci/phpstan.sh b/.ci/phpstan.sh index 6d11094b0a..1b1a74af2a 100755 --- a/.ci/phpstan.sh +++ b/.ci/phpstan.sh @@ -30,6 +30,14 @@ SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) # Do static code analysis. # ./vendor/bin/phpstan analyse -c .ci/phpstan.neon --no-progress -./vendor/bin/phpstan analyse -c .ci/phpstan.neon --error-format=table > phpstan-report.txt +./vendor/bin/phpstan analyse -c .ci/phpstan.neon --no-progress --error-format=table > phpstan-report.txt +EXIT_CODE=$? -echo 'The PHPstan report can be found in phpstan-report.txt' +if [ $GITHUB_ACTIONS -ne "true" ]; then + echo 'The PHPstan report can be found in phpstan-report.txt' + exit $EXIT_CODE +fi + +cat phpstan-report.txt + +exit $EXIT_CODE