From 6669ffc5f31447af23b54cd04630520af8f1a7c9 Mon Sep 17 00:00:00 2001 From: kruskall <99559985+kruskall@users.noreply.github.com> Date: Wed, 22 Feb 2023 04:23:18 +0100 Subject: [PATCH] fix: invert args order for prefix check in deprecation notice (#10329) --- internal/beatcmd/beat.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/beatcmd/beat.go b/internal/beatcmd/beat.go index 8d42c39ee4..c2b32385b0 100644 --- a/internal/beatcmd/beat.go +++ b/internal/beatcmd/beat.go @@ -270,7 +270,7 @@ func (b *Beat) Run(ctx context.Context) error { if runtime.GOOS == "darwin" { if host, err := sysinfo.Host(); err != nil { logger.Warnf("failed to retrieve kernel version, ignoring potential deprecation warning: %v", err) - } else if strings.HasPrefix("19.", host.Info().KernelVersion) { + } else if strings.HasPrefix(host.Info().KernelVersion, "19.") { // macOS 10.15.x (catalina) means darwin kernel 19.y logger.Warn("deprecation notice: support for macOS 10.15 will be removed in an upcoming version") }