[go1.15] fix pin-dependency.sh to only use module info

This commit is contained in:
Jordan Liggitt 2020-07-25 15:32:26 -04:00 committed by Stephen Augustus
parent dbdb8c9f4c
commit 2257f46cac

View File

@ -27,8 +27,8 @@ source "${KUBE_ROOT}/hack/lib/init.sh"
# Explicitly opt into go modules, even though we're inside a GOPATH directory
export GO111MODULE=on
# Explicitly clear GOFLAGS, since GOFLAGS=-mod=vendor breaks dependency resolution while rebuilding vendor
export GOFLAGS=
# Explicitly set GOFLAGS to ignore vendor, since GOFLAGS=-mod=vendor breaks dependency resolution while rebuilding vendor
export GOFLAGS=-mod=mod
# Detect problematic GOPROXY settings that prevent lookup of dependencies
if [[ "${GOPROXY:-}" == "off" ]]; then
kube::log::error "Cannot run with \$GOPROXY=off"