Skip to content

Commit

Permalink
fix: handle space in changed file name
Browse files Browse the repository at this point in the history
  • Loading branch information
sksat committed Nov 23, 2021
1 parent 0b655e2 commit b90e277
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,13 @@ if _git_changed; then

if $INPUT_ONLY_CHANGED; then
# --diff-filter=d excludes deleted files
OLDIFS="$IFS"
IFS=$'\n'
for file in $(git diff --name-only --diff-filter=d HEAD^..HEAD)
do
git add $file
git add "$file"
done
IFS="$OLDIFS"
else
# Add changes to git
git add "${INPUT_FILE_PATTERN}" || echo "Problem adding your files with pattern ${INPUT_FILE_PATTERN}"
Expand Down

0 comments on commit b90e277

Please sign in to comment.