diff --git a/hack/verify-golint.sh b/hack/verify-golint.sh index 3e0c579f49c..a81043d2990 100755 --- a/hack/verify-golint.sh +++ b/hack/verify-golint.sh @@ -24,9 +24,13 @@ source "${KUBE_ROOT}/hack/lib/init.sh" kube::golang::verify_go_version if ! which golint > /dev/null; then - echo 'Can not find golint, install with:' - echo 'go get -u golang.org/x/lint/golint' - exit 1 + # Ensure that we find the binaries we build before anything else. + export GOBIN="${KUBE_OUTPUT_BINPATH}" + PATH="${GOBIN}:${PATH}" + + # Install golint from vendor + echo 'Can not find golint, installing from vendor' + go install k8s.io/kubernetes/vendor/golang.org/x/lint/golint fi cd "${KUBE_ROOT}"