mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 05:57:25 +00:00
Make comment explain why we need sudo
Also make the check more correct and quieter.
This commit is contained in:
parent
0f041382ee
commit
83ac3ea0c9
@ -36,10 +36,12 @@ for APIROOT in ${APIROOTS}; do
|
|||||||
cp -a "${KUBE_ROOT}/${APIROOT}" "${_tmp}/${APIROOT}"
|
cp -a "${KUBE_ROOT}/${APIROOT}" "${_tmp}/${APIROOT}"
|
||||||
done
|
done
|
||||||
|
|
||||||
# We would like to use "sudo" when running on Travis and
|
# If not running as root, we need to use sudo to restore the original generated
|
||||||
# not use "sudo" when running on Jenkins.
|
# protobuf files.
|
||||||
SUDO="sudo"
|
SUDO=""
|
||||||
sudo -h > /dev/null || SUDO=""
|
if [[ "$(id -u)" != '0' ]]; then
|
||||||
|
SUDO="sudo"
|
||||||
|
fi
|
||||||
|
|
||||||
"${KUBE_ROOT}/hack/update-generated-protobuf.sh"
|
"${KUBE_ROOT}/hack/update-generated-protobuf.sh"
|
||||||
for APIROOT in ${APIROOTS}; do
|
for APIROOT in ${APIROOTS}; do
|
||||||
|
Loading…
Reference in New Issue
Block a user