From f630fa6f49c2864306ee4a0cdf2f535bc64443ed Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Wed, 17 May 2023 05:12:32 +0000 Subject: [PATCH] fix: add timeout to wget --- distro/debian/debian.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/distro/debian/debian.go b/distro/debian/debian.go index 05bf27a..d68777f 100644 --- a/distro/debian/debian.go +++ b/distro/debian/debian.go @@ -332,7 +332,9 @@ func InstallCommands(km config.KernelMask, pkgname string) (cmds []string, err e // TODO use faketime on old releases? pkg.Deb.URL = strings.Replace(pkg.Deb.URL, "https", "http", -1) - cmds = append(cmds, "wget --no-check-certificate "+pkg.Deb.URL) + cmds = append(cmds, "wget "+ + "--timeout=10 --waitretry=1 --tries=10 "+ + "--no-check-certificate "+pkg.Deb.URL) } cmds = append(cmds, "dpkg -i ./*.deb")