From 1eeccdf0eee81d59f8f0fc82f4abbbf21e72e994 Mon Sep 17 00:00:00 2001 From: michel-laterman Date: Mon, 17 Jun 2024 09:18:09 -0700 Subject: [PATCH] fix errors.Is comparison --- x-pack/elastic-agent/pkg/agent/cmd/enroll_cmd.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/elastic-agent/pkg/agent/cmd/enroll_cmd.go b/x-pack/elastic-agent/pkg/agent/cmd/enroll_cmd.go index 4dbaa4b74c66..8fbcfcddb521 100644 --- a/x-pack/elastic-agent/pkg/agent/cmd/enroll_cmd.go +++ b/x-pack/elastic-agent/pkg/agent/cmd/enroll_cmd.go @@ -827,7 +827,7 @@ func safelyStoreAgentInfo(s saver, reader io.Reader) error { for i := 0; i <= maxRetriesstoreAgentInfo; i++ { backExp.Wait() err = storeAgentInfo(s, reader) - if stderror.Is(err, filelock.ErrAppAlreadyRunning) { + if !stderror.Is(err, filelock.ErrAppAlreadyRunning) { break } }