Skip to content

Commit

Permalink
fix: invalid message when no file pattern is used (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
jackton1 authored May 23, 2022
1 parent 308b00a commit 1b13d25
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,19 @@ set -e

git config --local core.autocrlf "$INPUT_AUTO_CRLF"

echo "Checking for file changes: \"${INPUT_FILES}\"..."
if [[ -n "$INPUT_FILES" ]]; then
echo "Checking for file changes: \"${INPUT_FILES}\"..."

TRACKED_FILES=$(git diff --diff-filter=ACMUXTR --name-only | grep -E "(${INPUT_FILES})" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')

TRACKED_FILES=$(git diff --diff-filter=ACMUXTR --name-only | grep -E "(${INPUT_FILES})" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
# Find untracked changes
UNTRACKED_FILES=$(git ls-files --others --exclude-standard | grep -E "(${INPUT_FILES})" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
else
TRACKED_FILES=$(git diff --diff-filter=ACMUXTR --name-only | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')

# Find untracked changes
UNTRACKED_FILES=$(git ls-files --others --exclude-standard | grep -E "(${INPUT_FILES})" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
# Find untracked changes
UNTRACKED_FILES=$(git ls-files --others --exclude-standard | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
fi

CHANGED_FILES=""

Expand Down

0 comments on commit 1b13d25

Please sign in to comment.