Skip to content

Commit 83b4d1d

Browse files
authored
Merge pull request #6014 from pravk03/handle-del
ignore deleted files in verify-toc-vs-template.sh
2 parents 2c36c52 + bb5bb39 commit 83b4d1d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hack/verify-toc-vs-template.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ result=0
7878
kep_readmes=()
7979
while IFS= read -r changed_file
8080
do
81-
# make sure to ignore the template kep itself, we don't want to self-diff
82-
if [[ "${changed_file}" == "keps"*"README.md" ]] && [[ "${changed_file}" != "${template_readme}" ]]; then
81+
# make sure to ignore the template kep itself, we don't want to self-diff. Ignore deleted files.
82+
if [[ "${changed_file}" == "keps"*"README.md" ]] && [[ "${changed_file}" != "${template_readme}" ]] && [[ -f "${changed_file}" ]]; then
8383
kep_readmes+=("${changed_file}")
8484
fi
8585
done < <(git diff-tree --no-commit-id --name-only -r "${base}".."${target}")

0 commit comments

Comments
 (0)