From 537c0aff49f14f9eed067c6a54a8edac862273b5 Mon Sep 17 00:00:00 2001 From: Arthur Silva Sens Date: Thu, 25 Feb 2021 15:52:34 -0300 Subject: [PATCH] Prometheus and Promtool binaries now print help and usage to stdout (#8542) Signed-off-by: ArthurSens --- cmd/prometheus/main.go | 2 +- cmd/promtool/main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/prometheus/main.go b/cmd/prometheus/main.go index 964b0165c0..4193d23648 100644 --- a/cmd/prometheus/main.go +++ b/cmd/prometheus/main.go @@ -169,7 +169,7 @@ func main() { promlogConfig: promlog.Config{}, } - a := kingpin.New(filepath.Base(os.Args[0]), "The Prometheus monitoring server") + a := kingpin.New(filepath.Base(os.Args[0]), "The Prometheus monitoring server").UsageWriter(os.Stdout) a.Version(version.Print("prometheus")) diff --git a/cmd/promtool/main.go b/cmd/promtool/main.go index 19f765817b..505fecb59f 100644 --- a/cmd/promtool/main.go +++ b/cmd/promtool/main.go @@ -48,7 +48,7 @@ import ( ) func main() { - app := kingpin.New(filepath.Base(os.Args[0]), "Tooling for the Prometheus monitoring system.") + app := kingpin.New(filepath.Base(os.Args[0]), "Tooling for the Prometheus monitoring system.").UsageWriter(os.Stdout) app.Version(version.Print("promtool")) app.HelpFlag.Short('h')