From e7614ef3a7d90661643309b0e61a45e1a60890b2 Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Tue, 16 May 2023 19:37:57 +0000 Subject: [PATCH] feat: use snapshots only in case of failed fetch from repos --- distro/debian/debian.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distro/debian/debian.go b/distro/debian/debian.go index ae830ff..ef143f6 100644 --- a/distro/debian/debian.go +++ b/distro/debian/debian.go @@ -210,7 +210,7 @@ func ContainerCommands(km config.KernelMask) (commands []string) { cmdf("echo '%s' >> /etc/apt/sources.list", repo) } } else { - cmdf("sed -i " + + cmdf("apt-get update || sed -i " + "-e '/snapshot/!d' " + "-e 's/# deb/deb [check-valid-until=no trusted=yes]/' " + "/etc/apt/sources.list")