mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-26 04:36:00 +00:00
hacks: build main target without go in the PATH
`make` is able to build project binaries, but fails with error `hack/lib/golang.sh: line 455: go: command not found` trying to place them if go binary is not in the PATH. This happens because kube::golang::place_bins uses different environment than kube::golang::build_binaries. Setting up an one environment for both `kube::golang::place_bins` and `kube::golang::build_binaries` should solve this issue and allow default make target to fully work without go binary in the PATH.
This commit is contained in:
@@ -24,5 +24,6 @@ KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/../..
|
||||
KUBE_VERBOSE="${KUBE_VERBOSE:-1}"
|
||||
source "${KUBE_ROOT}/hack/lib/init.sh"
|
||||
|
||||
kube::golang::setup_env
|
||||
kube::golang::build_binaries "$@"
|
||||
kube::golang::place_bins
|
||||
|
Reference in New Issue
Block a user