Skip to content

Commit

Permalink
Exit successfully if no files have been found
Browse files Browse the repository at this point in the history
  • Loading branch information
grische committed Nov 11, 2021
1 parent 1ca1ab3 commit 87511d2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ export REVIEWDOG_GITHUB_API_TOKEN="${INPUT_GITHUB_TOKEN}"

FILES=$(find "${INPUT_PATH:-'.'}" -not -path "${INPUT_EXCLUDE}" -type f -name "${INPUT_PATTERN:-'*.sh'}")

# Exit early if no files have been found
if [ -z "${FILES}" ]; then
echo "No matching files found to check."
exit 0
fi

echo '::group:: Running shellcheck ...'
if [ "${INPUT_REPORTER}" = 'github-pr-review' ]; then
# erroformat: https://git.io/JeGMU
Expand Down

0 comments on commit 87511d2

Please sign in to comment.