Skip to content

Commit f9b8feb

Browse files
committed
Add better error message when markdown-link-check is not available
1 parent 98426fa commit f9b8feb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

hooks/mdlink-check.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ set -e
77
# workaround to allow GitHub Desktop to work, add this (hopefully harmless) setting here.
88
export PATH=$PATH:/usr/local/bin
99

10+
if ! command -v markdown-link-check; then
11+
>&2 echo "markdown-link-check is not available on this system."
12+
>&2 echo "Please install it by running 'npm install -g markdown-link-check'"
13+
exit 1
14+
fi
15+
1016
TMP_CONFIG="$(mktemp)"
1117
cat > "$TMP_CONFIG" <<EOF
1218
{

0 commit comments

Comments
 (0)