diff --git a/pre_commit_hooks/markdown/markdown-link-check.sh b/pre_commit_hooks/markdown/markdown-link-check.sh index f72c884..0c147e4 100755 --- a/pre_commit_hooks/markdown/markdown-link-check.sh +++ b/pre_commit_hooks/markdown/markdown-link-check.sh @@ -2,6 +2,11 @@ set -e +if command -v npm >/dev/null 2>&1; then + prefix=$(npm config get prefix) + export PATH=${PATH}:${prefix}/bin +fi + if ! command -v markdown-link-check >/dev/null 2>&1; then echo >&2 "markdown-link-check is not available on this system." echo >&2 "Please install it by running 'npm install -g markdown-link-check'"