When installing vendored godep, ensure that it's in path

This commit is contained in:
Christoph Blecker
2018-01-30 09:30:36 -08:00
parent 78ed389122
commit d58afe6384
2 changed files with 6 additions and 0 deletions

View File

@@ -446,6 +446,9 @@ kube::util::ensure_godep_version() {
kube::log::status "Installing godep version ${GODEP_VERSION}"
go install ./vendor/github.com/tools/godep/
GP="$(echo $GOPATH | cut -f1 -d:)"
hash -r # force bash to clear PATH cache
PATH="${GP}/bin:${PATH}"
if [[ "$(godep version 2>/dev/null)" != *"godep ${GODEP_VERSION}"* ]]; then
kube::log::error "Expected godep ${GODEP_VERSION}, got $(godep version)"