Skip to content

Commit

Permalink
Handle spaces in filenames (#93)
Browse files Browse the repository at this point in the history
Fixes: #92
  • Loading branch information
jackton1 committed Oct 29, 2021
1 parent 140ddce commit 70fa7b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ do
CHANGED_FILES+=($(git diff --diff-filter=ACMUXTR --name-only | grep -E "(${path})" || true))
# Find unstaged changes
# shellcheck disable=SC2207
CHANGED_FILES+=($(git status --porcelain | awk '{ print $2 }' | grep -E "(${path})" || true))
CHANGED_FILES+=($(git status --porcelain | awk '{$1=""; print $0 }' | grep -E "(${path})" || true))
done

IFS=" " read -r -a UNIQUE_CHANGED_FILES <<< "$(echo "${CHANGED_FILES[@]}" | tr " " "\n" | sort -u | tr "\n" " ")"
Expand Down

0 comments on commit 70fa7b9

Please sign in to comment.