diff --git a/hack/config-go.sh b/hack/config-go.sh index eb3ee198cba..3904f57ed3b 100644 --- a/hack/config-go.sh +++ b/hack/config-go.sh @@ -110,8 +110,11 @@ kube::setup_go_environment() { if [[ -n ${KUBE_EXTRA_GOPATH:-} ]]; then GOPATH=${GOPATH}:${KUBE_EXTRA_GOPATH} fi - # Set GOPATH to point to the tree maintained by `godep`. - GOPATH="${GOPATH}:${KUBE_REPO_ROOT}/Godeps/_workspace" + # Append the tree maintained by `godep` to the GOPATH unless KUBE_NO_GODEPS + # is defined. + if [[ -z ${KUBE_NO_GODEPS:-} ]]; then + GOPATH="${GOPATH}:${KUBE_REPO_ROOT}/Godeps/_workspace" + fi export GOPATH # Unset GOBIN in case it already exists in the current session.