From a57d983ecc03308322e5e0ab975d4e9043c876a9 Mon Sep 17 00:00:00 2001 From: Stefan Bueringer Date: Thu, 3 Aug 2023 07:29:14 +0200 Subject: [PATCH] Fix doctoc detection in verify-doctoc.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stefan Büringer buringerst@vmware.com --- hack/verify-doctoc.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 \