Skip to content

Commit 537440b

Browse files
committed
When grep matches a line, it returns an exit code of 0, but we want it to return 1 because it means it found a broken or redirect link.
1 parent 84df2f6 commit 537440b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ linkcheck: deps ## Run linkcheck
189189

190190
.PHONY: linkcheckbroken
191191
linkcheckbroken: deps ## Run linkcheck and show only broken links
192-
cd $(DOCS_DIR) && $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck | grep -wi "broken\|redirect" | GREP_COLORS='0;31' grep -vi "https://github.com/plone/volto/issues/" --color=auto || test $$? = 1
192+
cd $(DOCS_DIR) && $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck | GREP_COLORS='0;31' grep -wi "broken\|redirect" --color=always | GREP_COLORS='0;31' grep -vi "https://github.com/plone/volto/issues/" --color=always && if test $$? = 0; then exit 1; fi || test $$? = 1
193193
@echo
194194
@echo "Link check complete; look for any errors in the above output " \
195195
"or in $(BUILDDIR)/linkcheck/ ."

0 commit comments

Comments
 (0)