diff --git a/staging/src/k8s.io/code-generator/kube_codegen.sh b/staging/src/k8s.io/code-generator/kube_codegen.sh index 478ddde11a6a4..eb8c8829807e4 100755 --- a/staging/src/k8s.io/code-generator/kube_codegen.sh +++ b/staging/src/k8s.io/code-generator/kube_codegen.sh @@ -117,7 +117,10 @@ function kube::codegen::gen_helpers() { GO111MODULE=on go install $(printf "k8s.io/code-generator/cmd/%s " "${BINS[@]}") ) # Go installs in $GOBIN if defined, and $GOPATH/bin otherwise - gobin="${GOBIN:-$(go env GOPATH)/bin}" + gobin="$(go env GOBIN)" + if [[ -z "${gobin}" ]]; then + gobin="$(go env GOPATH)/bin" + fi # Deepcopy # @@ -368,7 +371,10 @@ function kube::codegen::gen_openapi() { GO111MODULE=on go install $(printf "k8s.io/kube-openapi/cmd/%s " "${BINS[@]}") ) # Go installs in $GOBIN if defined, and $GOPATH/bin otherwise - gobin="${GOBIN:-$(go env GOPATH)/bin}" + gobin="$(go env GOBIN)" + if [[ -z "${gobin}" ]]; then + gobin="$(go env GOPATH)/bin" + fi local input_pkgs=( "${extra_pkgs[@]:+"${extra_pkgs[@]}"}") while read -r dir; do @@ -601,7 +607,10 @@ function kube::codegen::gen_client() { GO111MODULE=on go install $(printf "k8s.io/code-generator/cmd/%s " "${BINS[@]}") ) # Go installs in $GOBIN if defined, and $GOPATH/bin otherwise - gobin="${GOBIN:-$(go env GOPATH)/bin}" + gobin="$(go env GOBIN)" + if [[ -z "${gobin}" ]]; then + gobin="$(go env GOPATH)/bin" + fi local group_versions=() local input_pkgs=() @@ -773,7 +782,10 @@ function kube::codegen::gen_register() { GO111MODULE=on go install $(printf "k8s.io/code-generator/cmd/%s " "${BINS[@]}") ) # Go installs in $GOBIN if defined, and $GOPATH/bin otherwise - gobin="${GOBIN:-$(go env GOPATH)/bin}" + gobin="$(go env GOBIN)" + if [[ -z "${gobin}" ]]; then + gobin="$(go env GOPATH)/bin" + fi # Register # pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy