Skip to content

CLI error output #721

@stuartnelson3

Description

@stuartnelson3

Any time there's an error, the usage text is output. It seems like a legitimate error (as opposed to mis-use of the cli) should just output the error text:

# ./amtool silence expire d08ead34-1119-400a-a1bb-2788853fc520
Error: expired silence must not be modified
Usage:
  amtool silence expire [flags]

Global Flags:
      --alertmanager.url string   Alertmanager to talk to
      --config string             config file (default is $HOME/.amtool.yml)
  -o, --output string             Output formatter (simple, extended, json) (default "simple")
  -q, --quiet                     Only show silence ids
  -v, --verbose                   Verbose running information

This should just be

# ./amtool silence expire d08ead34-1119-400a-a1bb-2788853fc520
Error: expired silence must not be modified

That's my opinion, anyway. Thoughts?

@mxinden @fabxc @brancz @Kellel

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions