Merge pull request #2505 from ArthurSens/master

Amtool and Alertmanager binaries print to stdout
This commit is contained in:
Julien Pivotto 2021-03-05 23:36:56 +01:00 committed by GitHub
commit 0fef08028b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -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)

View File

@ -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')