Skip to content

Commit

Permalink
chore: fallback to sudo
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Francis <jackfrancis@gmail.com>
  • Loading branch information
jackfrancis committed Nov 29, 2023
1 parent 6aabe5c commit 25531cc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions hack/toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ tools() {
}

kubebuilder() {
sudo mkdir -p /usr/local/kubebuilder/bin
sudo chown "${USER}" /usr/local/kubebuilder/bin
if ! mkdir -p ${KUBEBUILDER_ASSETS}; then
sudo mkdir -p ${KUBEBUILDER_ASSETS}
sudo chown $(whoami) ${KUBEBUILDER_ASSETS}
fi
arch=$(go env GOARCH)
ln -sf $(setup-envtest use -p path "${K8S_VERSION}" --arch="${arch}" --bin-dir="${KUBEBUILDER_ASSETS}")/* ${KUBEBUILDER_ASSETS}
find $KUBEBUILDER_ASSETS
Expand Down

0 comments on commit 25531cc

Please sign in to comment.