Skip to content

Commit 0639baf

Browse files
authored
Merge pull request kubernetes#2541 from chaodaiG/fix-test
Add more debugging message when toc related script failed due to grep…
2 parents 06a8472 + a115a58 commit 0639baf

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

hack/update-toc.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,7 @@ cd "${ROOT}"
4545
# Update tables of contents if necessary.
4646
find keps -name '*.md' \
4747
| grep -Fxvf hack/.notableofcontents \
48-
| xargs mdtoc --inplace --max-depth=5
48+
| xargs mdtoc --inplace --max-depth=5 || (
49+
echo "Failed generating TOC. If this failed silently and you are on mac, try 'brew install grep'"
50+
exit 1
51+
)

hack/verify-toc.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,7 @@ echo "Checking table of contents are up to date..."
4646
# Verify tables of contents are up-to-date
4747
find keps -name '*.md' \
4848
| grep -Fxvf hack/.notableofcontents \
49-
| xargs mdtoc --inplace --max-depth=5 --dryrun
49+
| xargs mdtoc --inplace --max-depth=5 --dryrun || (
50+
echo "Table of content not up to date. If this failed silently and you are on mac, try 'brew install grep'"
51+
exit 1
52+
)

0 commit comments

Comments
 (0)