From 0ea3f3a1183c1263360dd2c68f012c4097035296 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matou=C5=A1=20Volf?= Date: Fri, 3 Jan 2025 13:45:17 +0100 Subject: [PATCH] ci: handle no shell files in the Shellcheck check --- .github/workflows/shellcheck-check.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/shellcheck-check.yaml b/.github/workflows/shellcheck-check.yaml index bdf67f6..480b5ed 100644 --- a/.github/workflows/shellcheck-check.yaml +++ b/.github/workflows/shellcheck-check.yaml @@ -25,4 +25,10 @@ jobs: fetch-depth: 0 - name: ShellCheck check # https://www.shellcheck.net/wiki/Recursiveness - run: find . -type f -name "*.sh" -print0 | xargs -0 shellcheck + run: | + if find . -type f -name "*.sh" -print0 | grep -qz .; then + find . -type f -name "*.sh" -print0 | xargs -0 shellcheck + exit 0 + else + echo "No shell scripts found. Skipping ShellCheck." + fi -- 2.47.1