Preserve environment when running sudo commands in make_apt.sh.

This is so that `DEBIAN_FRONTEND=noninteractive` env var which has been set
is in effect while running apt-get commands.

PiperOrigin-RevId: 488432544
This commit is contained in:
Ayush Ranjan
2022-11-14 12:10:24 -08:00
committed by gVisor bot
parent 3c83ccab23
commit bd5e1d8f58
+2 -2
View File
@@ -33,8 +33,8 @@ shift; shift; shift # For "$@" below.
export DEBIAN_FRONTEND=noninteractive
function apt_install() {
while true; do
sudo apt-get update &&
sudo apt-get install -y "$@" &&
sudo -E apt-get update &&
sudo -E apt-get install -y "$@" &&
true
result="${?}"
case $result in