From cc45cdaf22bc76dc79f20fcb29437c0a890f7b0d Mon Sep 17 00:00:00 2001 From: z1cheng Date: Fri, 7 Jul 2023 07:34:32 +0000 Subject: [PATCH] Use -z operator Signed-off-by: z1cheng --- hack/verify-golint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/verify-golint.sh b/hack/verify-golint.sh index 0b623c767..9fd617b8f 100755 --- a/hack/verify-golint.sh +++ b/hack/verify-golint.sh @@ -24,7 +24,7 @@ cd "${KUBE_ROOT}" LINT=${LINT:-golangci-lint} -if ! command -v ${LINT} >/dev/null 2>&1; then +if [[ -z "$(command -v ${LINT})" ]]; then echo "${LINT} is missing. Installing it now." # See: https://golangci-lint.run/usage/install/#local-installation curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.53.3