alertmanager should raise an error if unexpected arguments are present on the command line

This commit is contained in:
Patrick Bogen 2016-08-16 11:15:45 -07:00
parent 1c13e773a7
commit ca844915b3
No known key found for this signature in database
GPG Key ID: 97B1488596895F2F

View File

@ -88,6 +88,10 @@ func main() {
flag.Var(peers, "mesh.peer", "initial peers (may be repeated)")
flag.Parse()
if len(flag.Args()) > 0 {
log.Fatalln("Received unexpected and unparsed arguments: ", strings.Join(flag.Args(), ", "))
}
if *showVersion {
fmt.Fprintln(os.Stdout, version.Print("alertmanager"))
os.Exit(0)