From 75ce300d7cc63d58a49dd4ccc2c11bd4f6caa984 Mon Sep 17 00:00:00 2001 From: Yoann La Cancellera Date: Wed, 20 Sep 2023 11:37:42 +0200 Subject: [PATCH] Fix: "not found" should not be an error if it shows nothing, it can be understood as easily as a grep returning nothing adding an error log is too verbose --- src/go/pt-galera-log-explainer/internal.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/go/pt-galera-log-explainer/internal.go b/src/go/pt-galera-log-explainer/internal.go index 8c18c692..5253e44e 100644 --- a/src/go/pt-galera-log-explainer/internal.go +++ b/src/go/pt-galera-log-explainer/internal.go @@ -135,7 +135,7 @@ func execGrepAndIterate(path, compiledRegex string, stdout chan<- string) error // double-check it stopped correctly if err = cmd.Wait(); err != nil { if exiterr, ok := err.(*exec.ExitError); ok && exiterr.ExitCode() == 1 { - return errors.New("found nothing") + return nil } return errors.Wrap(err, "grep subprocess error") }