mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 02:41:25 +00:00
Set GOCACHE and GOMODCACHE
If these are not set, set them. This ensures that any subsequent scripts we call (which may call setup_env again) use the same values.
This commit is contained in:
parent
965d5d8608
commit
7c262b901f
@ -521,7 +521,10 @@ kube::golang::setup_env() {
|
||||
kube::golang::create_gopath_tree
|
||||
export GOPATH="${KUBE_GOPATH}"
|
||||
|
||||
export GOCACHE="${KUBE_GOPATH}/cache"
|
||||
# If these are not set, set them now. This ensures that any subsequent
|
||||
# scripts we run (which may call this function again) use the same values.
|
||||
export GOCACHE="${GOCACHE:-"${KUBE_GOPATH}/cache/build"}"
|
||||
export GOMODCACHE="${GOMODCACHE:-"${KUBE_GOPATH}/cache/mod"}"
|
||||
|
||||
# Make sure our own Go binaries are in PATH.
|
||||
export PATH="${KUBE_GOPATH}/bin:${PATH}"
|
||||
|
Loading…
Reference in New Issue
Block a user