From 6a0846e12982f53e71681432899a9b6799b2ef82 Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Thu, 11 May 2023 20:26:39 +0000 Subject: [PATCH] Better error handling --- debian.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/debian.go b/debian.go index 512f922..59826f4 100644 --- a/debian.go +++ b/debian.go @@ -41,7 +41,9 @@ func (cmd *DebianCacheCmd) Run() (err error) { var dk debian.DebianKernel dk, err = debian.GetDebianKernel(version) - if err != nil { + if err == debian.ErrNoBinaryPackages { + slog.Warn().Err(err).Msg("") + } else if err != nil { slog.Error().Err(err).Msg("get debian kernel") continue }