mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-06-09 08:55:55 -04:00
fix for gimme when $HOME is not writable
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
parent
b4e17418b3
commit
cfff359b41
1 changed files with 3 additions and 0 deletions
|
|
@ -528,6 +528,9 @@ kube::golang::internal::verify_go_version() {
|
|||
# get the latest master version of Go, build and use that version
|
||||
export GOTOOLCHAIN='local'
|
||||
if [[ ! -f "${KUBE_ROOT}/.gimme/envs/gomaster.env" && ! -f "${HOME}/.gimme/envs/gomaster.env" ]]; then
|
||||
# gimme tries to write to $HOME directory, in CI environments this may not be writable.
|
||||
# shellcheck disable=SC2155
|
||||
[ -w "${HOME:?Variable HOME is not set}" ] || export HOME="$(mktemp -d)"
|
||||
GOROOT_BOOTSTRAP="${GOROOT_BOOTSTRAP:-/usr/local/go}" "${KUBE_ROOT}/third_party/gimme/gimme" "master" >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue