From cebe8c397be898845df282b2e3ed1522c9c84bcc Mon Sep 17 00:00:00 2001 From: nicobrauchtgit Date: Mon, 11 Mar 2024 18:17:54 +0100 Subject: [PATCH] Update console-logs.yml --- .github/workflows/console-logs.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/console-logs.yml b/.github/workflows/console-logs.yml index c4ff547..6da3818 100644 --- a/.github/workflows/console-logs.yml +++ b/.github/workflows/console-logs.yml @@ -14,10 +14,15 @@ jobs: - name: Check for console.log statements run: | - if grep -rnw 'src/' -e 'console.log'; then - echo "console.log statement found!" + LOGS_FOUND=0 + while IFS= read -r line + do + echo "::error ::console.log found: $line" + LOGS_FOUND=1 + done < <(grep -rnw 'src/' -e 'console.log') + + if [ "$LOGS_FOUND" -ne "0" ]; then exit 1 else echo "No console.log statements found." fi -