From 6bf19130203c83bb72dd20a5c1ccd99a6716cb3b Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Mon, 16 Jul 2018 09:28:56 -0400 Subject: Only check overlay extensions on git-tracked files This way, when editors leave over temporary files from editing user-overlays, we don't prevent commits unless they are added to git. --- dev/tools/check-overlays.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dev/tools/check-overlays.sh b/dev/tools/check-overlays.sh index f7e05b51c..33a9ff058 100755 --- a/dev/tools/check-overlays.sh +++ b/dev/tools/check-overlays.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -for f in dev/ci/user-overlays/* +for f in $(git ls-files "dev/ci/user-overlays/") do - if ! ([[ $f = dev/ci/user-overlays/README.md ]] || [[ $f == *.sh ]]) + if ! ([[ "$f" = dev/ci/user-overlays/README.md ]] || [[ "$f" == *.sh ]]) then >&2 echo "Bad overlay '$f'." >&2 echo "User overlays need to have extension .sh to be picked up!" -- cgit v1.2.3