From f0efa99ee2fcd1ca64f2bb2edf0850b655803a21 Mon Sep 17 00:00:00 2001 From: 0xmachos <0xmachos@gmail.com> Date: Sun, 5 May 2024 15:30:35 +0100 Subject: [PATCH] lint-plists: Add code to check ERRORS array --- .github/workflows/Shellcheck.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/Shellcheck.yml b/.github/workflows/Shellcheck.yml index 074c584..e5a2946 100644 --- a/.github/workflows/Shellcheck.yml +++ b/.github/workflows/Shellcheck.yml @@ -93,3 +93,13 @@ jobs: ERRORS+=("${file}") fi done + + if [[ ${#ERRORS[@]} -eq 0 ]]; then + # If ERRORS empty then + echo "[PASS] No errors, hooray" + exit 0 + else + # If ERRORS not empty, print the names of files which failed + echo "[FAIL] These files failed linting: ${ERRORS[*]}" + exit 1 + fi