From fdb4c48ebc29ee781bdae1d188c0dc364838b612 Mon Sep 17 00:00:00 2001 From: coincashew Date: Thu, 19 Dec 2024 22:50:09 -0300 Subject: [PATCH 1/2] Fix versionFlag to output to stdout --- cli/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/main.go b/cli/main.go index b02b5677..d3e24df6 100644 --- a/cli/main.go +++ b/cli/main.go @@ -55,7 +55,7 @@ func Main() { func start(_ context.Context, cmd *cli.Command) error { // Only print the version if the flag is set if cmd.IsSet(versionFlag.Name) { - log.Infof("mev-boost %s\n", config.Version) + fmt.Printf("mev-boost %s\n", config.Version) //nolint return nil } From f2595dce5dc530239c7207d05cdb7aec4d6913cc Mon Sep 17 00:00:00 2001 From: Justin Traglia Date: Fri, 31 Jan 2025 08:55:10 -0600 Subject: [PATCH 2/2] Write version with fmt.Fprintf(cmd.Writer, ...) --- cli/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/main.go b/cli/main.go index d3e24df6..108c56e4 100644 --- a/cli/main.go +++ b/cli/main.go @@ -55,7 +55,7 @@ func Main() { func start(_ context.Context, cmd *cli.Command) error { // Only print the version if the flag is set if cmd.IsSet(versionFlag.Name) { - fmt.Printf("mev-boost %s\n", config.Version) //nolint + fmt.Fprintf(cmd.Writer, "mev-boost %s\n", config.Version) return nil }