diff --git a/hack/verify-doctoc.sh b/hack/verify-doctoc.sh index 02f276066e28..54b4b6945100 100755 --- a/hack/verify-doctoc.sh +++ b/hack/verify-doctoc.sh @@ -22,7 +22,10 @@ if [[ "${TRACE-0}" == "1" ]]; then set -o xtrace fi -command -v doctoc || echo "doctoc is not available on your system, skipping verification" && exit 0 +if [[ -z "$(command -v doctoc)" ]]; then + echo "doctoc is not available on your system, skipping verification" + exit 0 +fi doctoc_files="README.md \ CONTRIBUTING.md \