From 70fa7b9b9afec2af1d9fd3ca3894b7bc0f09b9d3 Mon Sep 17 00:00:00 2001 From: Tonye Jack Date: Fri, 29 Oct 2021 06:00:49 -0400 Subject: [PATCH] Handle spaces in filenames (#93) Fixes: #92 --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index c69c331..10be45d 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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" " ")"