From 74d388e3f45f5daf7f290ae2a87e6e5deebfb8ac Mon Sep 17 00:00:00 2001 From: ArthurSens Date: Thu, 4 Mar 2021 12:14:59 +0000 Subject: [PATCH] Amtool and Alertmanager binaries print to stdout Signed-off-by: ArthurSens --- cli/root.go | 2 +- cmd/alertmanager/main.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/root.go b/cli/root.go index bb1cc60c..c736d4e9 100644 --- a/cli/root.go +++ b/cli/root.go @@ -89,7 +89,7 @@ func NewAlertmanagerClient(amURL *url.URL) *client.Alertmanager { // Execute is the main function for the amtool command func Execute() { var ( - app = kingpin.New("amtool", helpRoot) + app = kingpin.New("amtool", helpRoot).UsageWriter(os.Stdout) ) format.InitFormatFlags(app) diff --git a/cmd/alertmanager/main.go b/cmd/alertmanager/main.go index 64102960..c963b2b9 100644 --- a/cmd/alertmanager/main.go +++ b/cmd/alertmanager/main.go @@ -210,6 +210,7 @@ func run() int { ) promlogflag.AddFlags(kingpin.CommandLine, &promlogConfig) + kingpin.CommandLine.UsageWriter(os.Stdout) kingpin.Version(version.Print("alertmanager")) kingpin.CommandLine.GetFlag("help").Short('h')