diff --git a/test/images/image-util.sh b/test/images/image-util.sh index f91e3e9fffc..6d11ca081bc 100755 --- a/test/images/image-util.sh +++ b/test/images/image-util.sh @@ -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}"