From 3f64d2008d00187889e926f0c44e459514e9e84c Mon Sep 17 00:00:00 2001 From: Michael Altfield Date: Thu, 8 Aug 2024 12:43:34 -0500 Subject: [PATCH] fix syntax error * https://github.com/BusKill/buskill-app/pull/90#issuecomment-2276341566 * https://github.com/BusKill/buskill-app/actions/runs/10306855519/job/28530828444?pr=90 2024-08-08T17:39:22.5370542Z ##[group]Run if [[ "WARNING: git diff failed!" | grep -Ei "ERROR|WARNING" ]]; then 2024-08-08T17:39:22.5371079Z [36;1m[0m 2024-08-08T17:39:22.5371457Z [36;1mif [[ "WARNING: git diff failed!" | grep -Ei "ERROR|WARNING" ]]; then[0m 2024-08-08T17:39:22.5371917Z [36;1m exit 1[0m 2024-08-08T17:39:22.5372141Z [36;1melse[0m 2024-08-08T17:39:22.5372356Z [36;1m exit 0[0m 2024-08-08T17:39:22.5372651Z shell: bash {0} 2024-08-08T17:39:22.5372864Z env: 2024-08-08T17:39:22.5373114Z UNICODE_HUMAN_RESULT: WARNING: git diff failed! 2024-08-08T17:39:22.5373466Z ##[endgroup] 2024-08-08T17:39:22.6145287Z /__w/_temp/8a48bf26-0dbe-4e74-bfec-9efb78fd13c5.sh: line 2: unexpected token `|', conditional binary operator expected 2024-08-08T17:39:22.6147084Z /__w/_temp/8a48bf26-0dbe-4e74-bfec-9efb78fd13c5.sh: line 2: syntax error near `|' 2024-08-08T17:39:22.6148958Z /__w/_temp/8a48bf26-0dbe-4e74-bfec-9efb78fd13c5.sh: line 2: `if [[ "WARNING: git diff failed!" | grep -Ei "ERROR|WARNING" ]]; then' 2024-08-08T17:39:22.6172279Z ##[error]Process completed with exit code 2. --- .github/workflows/unicode_warn.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unicode_warn.yml b/.github/workflows/unicode_warn.yml index bda1627..6d9f48b 100644 --- a/.github/workflows/unicode_warn.yml +++ b/.github/workflows/unicode_warn.yml @@ -1,6 +1,6 @@ ################################################################################ # File: .github/workflows/unicode_warn.yml -# Version: 0.4 +# Version: 0.5 # Purpose: Detects Unicode in PRs and comments the results of findings in PR # Authors: Michael Altfield # Created: 2021-11-20 @@ -116,7 +116,7 @@ jobs: - name: Exit with or without error run: | - if [[ "${{ env.UNICODE_HUMAN_RESULT }}" | grep -Ei "ERROR|WARNING" ]]; then + if [[ $(echo "${{ env.UNICODE_HUMAN_RESULT }}" | grep -Ei "ERROR|WARNING") ]]; then exit 1 else exit 0