diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index e7db2a2..88cbc66 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -28,7 +28,10 @@ jobs: SEVERITY: ${{ inputs.severity }} run: | if [ -n "$SCRIPT_DIRS" ]; then - find "$SCRIPT_DIRS" -type f -print0 | xargs -0 shellcheck --severity="$SEVERITY" + # Split the space-separated list into an array so each dir/file is a + # distinct find argument (quoting "$SCRIPT_DIRS" made it a single path). + read -ra dirs <<< "$SCRIPT_DIRS" + find "${dirs[@]}" -type f -print0 | xargs -0 shellcheck --severity="$SEVERITY" else find . -name "*.sh" -not -path "./.git/*" -print0 | xargs -0 shellcheck --severity="$SEVERITY" fi