diff --git a/Makefile b/Makefile index de23c730e3..1ba12c7509 100644 --- a/Makefile +++ b/Makefile @@ -154,7 +154,7 @@ endif @echo @benchstat $(OUTPUT_DIR)/bench_storage.old.txt $(OUTPUT_DIR)/bench_storage.txt -HAS_BENCHSTAT:=$(shell which benchstat) +HAS_BENCHSTAT:=$(shell command -v benchstat) .PHONY: benchstat benchstat: ifndef HAS_BENCHSTAT @@ -221,7 +221,7 @@ update: update-licenses update-lint update-toc update-deps update-generated # License # ------- -HAS_ADDLICENSE:=$(shell which addlicense) +HAS_ADDLICENSE:=$(shell command -v addlicense) .PHONY: verify-licenses verify-licenses:addlicense find -type f -name "*.go" ! -path "*/vendor/*" | xargs $(GOPATH)/bin/addlicense -check || (echo 'Run "make update"' && exit 1) @@ -267,7 +267,7 @@ verify-toc: mdtoc $(docs_with_toc) update-toc: mdtoc $(docs_with_toc) $(GOPATH)/bin/mdtoc --inplace $(docs_with_toc) -HAS_MDTOC:=$(shell which mdtoc) +HAS_MDTOC:=$(shell command -v mdtoc) .PHONY: mdtoc mdtoc: ifndef HAS_MDTOC @@ -281,7 +281,7 @@ endif verify-structured-logging: logcheck $(GOPATH)/bin/logcheck ./... || (echo 'Fix structured logging' && exit 1) -HAS_LOGCHECK:=$(shell which logcheck) +HAS_LOGCHECK:=$(shell command -v logcheck) .PHONY: logcheck logcheck: ifndef HAS_LOGCHECK diff --git a/test/test-e2e.sh b/test/test-e2e.sh index a1a3937048..459b61530a 100755 --- a/test/test-e2e.sh +++ b/test/test-e2e.sh @@ -16,7 +16,7 @@ delete_cluster() { } setup_helm() { - HELM=$(which helm || true) + HELM=$(command -v helm || true) if [[ ${HELM} == "" || $(${HELM} |grep Version |awk -F'Version:' '{print $2}' |awk -F',' '{print $1}') != "\"v${HELM_VERSION}\"" ]] ; then HELM=_output/helm fi @@ -30,7 +30,7 @@ setup_helm() { } setup_kind() { - KIND=$(which kind || true) + KIND=$(command -v kind || true) if [[ ${KIND} == "" || $(${KIND} --version) != "kind version ${KIND_VERSION}" ]] ; then KIND=_output/kind fi @@ -44,7 +44,7 @@ setup_kind() { } setup_skaffold() { - SKAFFOLD=$(which skaffold || true) + SKAFFOLD=$(command -v skaffold || true) if [[ ${SKAFFOLD} == "" || $(${SKAFFOLD} version) != "v${SKAFFOLD_VERSION}" ]] ; then SKAFFOLD=_output/skaffold fi @@ -62,7 +62,7 @@ get_kubectl_version() { } setup_kubectl() { - KUBECTL=$(which kubectl || true) + KUBECTL=$(command -v kubectl || true) if [[ ${KUBECTL} == "" || $(get_kubectl_version) != "v${KUBECTL_VERSION}" ]] ; then KUBECTL=_output/kubectl fi