Use -z operator

Signed-off-by: z1cheng <imchench@gmail.com>
This commit is contained in:
z1cheng 2023-07-07 07:34:32 +00:00
parent 280a7e7565
commit cc45cdaf22

View file

@ -24,7 +24,7 @@ cd "${KUBE_ROOT}"
LINT=${LINT:-golangci-lint} 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." echo "${LINT} is missing. Installing it now."
# See: https://golangci-lint.run/usage/install/#local-installation # 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 curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.53.3