mirror of
https://github.com/creyD/prettier_action.git
synced 2026-04-12 19:30:30 +02:00
Merge pull request #71 from sksat/handle-space-in-fname
handle space in file name
This commit is contained in:
@@ -101,10 +101,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}"
|
||||
|
||||
Reference in New Issue
Block a user