mirror of https://github.com/k3s-io/k3s
Merge pull request #62210 from ixdy/verify-bazel-macos-tmpdir
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Fully resolve tmpdir in verify-bazel.sh, since it might be a symlink on macOS **What this PR does / why we need it**: Apparently the system tmpdir is inside a symlink on macOS, which confuses gazelle's symlink logic. By resolving this symlink to the absolute path, we can avoid the issue. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes #61986 **Release note**: ```release-note NONE ``` /assign @cblecker cc @patrikerdespull/8/head
commit
bb3887d7dd
|
@ -31,7 +31,7 @@ fi
|
||||||
# TODO(spxtr): Remove this line once Bazel is the only way to build.
|
# TODO(spxtr): Remove this line once Bazel is the only way to build.
|
||||||
rm -f "${KUBE_ROOT}/pkg/generated/openapi/zz_generated.openapi.go"
|
rm -f "${KUBE_ROOT}/pkg/generated/openapi/zz_generated.openapi.go"
|
||||||
|
|
||||||
_tmpdir="$(mktemp -d -t verify-bazel.XXXXXX)"
|
_tmpdir="$(kube::realpath $(mktemp -d -t verify-bazel.XXXXXX))"
|
||||||
kube::util::trap_add "rm -rf ${_tmpdir}" EXIT
|
kube::util::trap_add "rm -rf ${_tmpdir}" EXIT
|
||||||
|
|
||||||
_tmp_gopath="${_tmpdir}/go"
|
_tmp_gopath="${_tmpdir}/go"
|
||||||
|
|
|
@ -35,7 +35,7 @@ kube::util::ensure_godep_version
|
||||||
|
|
||||||
if [[ -z ${TMP_GOPATH:-} ]]; then
|
if [[ -z ${TMP_GOPATH:-} ]]; then
|
||||||
# Create a nice clean place to put our new godeps
|
# Create a nice clean place to put our new godeps
|
||||||
_tmpdir="$(mktemp -d -t gopath.XXXXXX)"
|
_tmpdir="$(kube::realpath $(mktemp -d -t gopath.XXXXXX))"
|
||||||
else
|
else
|
||||||
# reuse what we might have saved previously
|
# reuse what we might have saved previously
|
||||||
_tmpdir="${TMP_GOPATH}"
|
_tmpdir="${TMP_GOPATH}"
|
||||||
|
|
Loading…
Reference in New Issue