Merge pull request #99889 from aojea/imageutil

image util unbound variable
This commit is contained in:
Kubernetes Prow Robot 2021-03-06 16:45:41 -08:00 committed by GitHub
commit a44db4f9ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -161,9 +161,9 @@ build() {
"${SED}" -i "s|QEMUARCH|${QEMUARCHS[$arch]}|g" Dockerfile
# Register qemu-*-static for all supported processors except the current one
echo 'Registering qemu-*-static binaries in the kernel'
local sudo
local sudo=""
if [[ $(id -u) -ne 0 ]]; then
sudo=sudo
sudo="sudo"
fi
${sudo} "${KUBE_ROOT}/third_party/multiarch/qemu-user-static/register/register.sh" --reset -p yes
curl -sSL https://github.com/multiarch/qemu-user-static/releases/download/"${QEMUVERSION}"/x86_64_qemu-"${QEMUARCHS[$arch]}"-static.tar.gz | tar -xz -C "${temp_dir}"