From b4947be0c835fb39b6a923d67f51af01a46f015b Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Mon, 14 Feb 2022 15:55:46 -0500 Subject: [PATCH] scripts/installer: automagically run apt update (#3939) When running this script against a totally fresh out of the box Debian 11 image, sometimes it will fail to run because it doesn't have a package list cached. This patch adds an `apt-get update` to ensure that the local package cache is up to date. Signed-off-by: Xe Iaso --- scripts/installer.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/installer.sh b/scripts/installer.sh index d51d61fe2..9ad26f8e7 100755 --- a/scripts/installer.sh +++ b/scripts/installer.sh @@ -407,7 +407,8 @@ main() { fi export DEBIAN_FRONTEND=noninteractive if ! type gpg >/dev/null; then - apt-get install -y gnupg + $SUDO apt-get update + $SUDO apt-get install -y gnupg fi set -x