Skip to content

Commit

Permalink
Merge pull request #30 from grische/fix/failure_on_empty_list
Browse files Browse the repository at this point in the history
Exit successfully if no files have been found
  • Loading branch information
shogo82148 authored Nov 13, 2021
2 parents 798a1c7 + 87511d2 commit 1556838
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 @@ -28,6 +28,12 @@ fi

FILES="${files_with_pattern} ${files_with_shebang}"

# 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 1556838

Please sign in to comment.