From bb5bb39cc4b15b7fbecf564494e475fd67c66ee7 Mon Sep 17 00:00:00 2001 From: Praveen Krishna Date: Tue, 14 Apr 2026 19:03:57 +0000 Subject: [PATCH] ignore deleted files in verify-toc-vs-template.sh --- hack/verify-toc-vs-template.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hack/verify-toc-vs-template.sh b/hack/verify-toc-vs-template.sh index 886ad99f40fe..0928a2a3c7e7 100755 --- a/hack/verify-toc-vs-template.sh +++ b/hack/verify-toc-vs-template.sh @@ -78,8 +78,8 @@ result=0 kep_readmes=() while IFS= read -r changed_file do - # make sure to ignore the template kep itself, we don't want to self-diff - if [[ "${changed_file}" == "keps"*"README.md" ]] && [[ "${changed_file}" != "${template_readme}" ]]; then + # make sure to ignore the template kep itself, we don't want to self-diff. Ignore deleted files. + if [[ "${changed_file}" == "keps"*"README.md" ]] && [[ "${changed_file}" != "${template_readme}" ]] && [[ -f "${changed_file}" ]]; then kep_readmes+=("${changed_file}") fi done < <(git diff-tree --no-commit-id --name-only -r "${base}".."${target}")