Fix apt-get exit code checking bug in tools/install_containerd.sh.

We were not fetching the exit code of apt-get correctly in case of failure.

PiperOrigin-RevId: 511818267
This commit is contained in:
Ayush Ranjan
2023-02-23 10:16:36 -08:00
committed by gVisor bot
parent 6c236a236c
commit a93c6a94fa
+5 -6
View File
@@ -77,13 +77,12 @@ readonly BTRFS_DEV
# Install dependencies for the crictl tests.
export DEBIAN_FRONTEND=noninteractive
while true; do
if (apt-get update && apt-get install -y \
"${BTRFS_DEV}" \
libseccomp-dev); then
break
fi
apt-get update && apt-get install -y \
"${BTRFS_DEV}" libseccomp-dev
result=$?
if [[ $result -ne 100 ]]; then
if [[ $result -eq 0 ]]; then
break
elif [[ $result -ne 100 ]]; then
exit $result
fi
done