call kube::golang::setup_env before setting up worktree

This commit is contained in:
Benjamin Elder
2023-04-21 14:43:24 -07:00
parent 4336b4ac45
commit 726992f9db
5 changed files with 9 additions and 2 deletions

View File

@@ -31,6 +31,8 @@ source "${KUBE_ROOT}/hack/lib/init.sh"
export GO111MODULE=on
kube::util::ensure_clean_working_dir
# This sets up the environment, like GOCACHE, which keeps the worktree cleaner.
kube::golang::setup_env
_tmpdir="$(kube::realpath "$(mktemp -d -t "$(basename "$0").XXXXXX")")"
git worktree add -f -q "${_tmpdir}" HEAD