From c223b0531fff306ab6a317c95db631fcce492242 Mon Sep 17 00:00:00 2001 From: oliverpool Date: Wed, 23 Mar 2022 20:51:09 +0100 Subject: [PATCH] fix found logic --- cmd/check-update/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/check-update/main.go b/cmd/check-update/main.go index 8100d59..12cdce4 100644 --- a/cmd/check-update/main.go +++ b/cmd/check-update/main.go @@ -28,16 +28,18 @@ func run() error { kernelPrefix := "Filename: pool/main/r/raspberrypi-firmware/raspberrypi-kernel_" version := "" versionPrefix := "Version: " + found := false err := scanOnlineTextFile(packagesURL, func(s string) bool { if strings.HasPrefix(s, versionPrefix) { version = s[len(versionPrefix):] } if strings.HasPrefix(s, kernelPrefix) { + found = true return true } return false }) - if version == "" { + if !found { if err != nil { return err }