Skip to content

Commit

Permalink
Fix installation of controller-gen in prowjobs (#187)
Browse files Browse the repository at this point in the history
Issue #, if available:

Description of changes:
* Fix installation of controller-gen in prowjobs
* Installing controller-gen in prowjobs fail because $GOPATH/bin directory is not present.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
  • Loading branch information
vijtrip2 authored Sep 8, 2021
1 parent 1e058d0 commit 394e829
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/install-controller-gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ if ! is_installed controller-gen || ! k8s_controller_gen_version_equals "$CONTRO
# GOBIN and GOPATH are not always set, so default to GOPATH from `go env`
__GOPATH=$(go env GOPATH)
__install_dir=${GOBIN:-$__GOPATH/bin}
# If __install_dir does not exist, create it
[[ -d $__install_dir ]] || mkdir -p "$__install_dir"
__install_path="$__install_dir/controller-gen"
__work_dir=$(mktemp -d /tmp/controller-gen-XXX)

Expand Down

0 comments on commit 394e829

Please sign in to comment.