From f4b0578f776a08fab1b051c292d2ebb4b4fe6813 Mon Sep 17 00:00:00 2001 From: terasum Date: Tue, 3 Jul 2018 12:17:40 +0800 Subject: [PATCH] cmd/p2psim: add exit error output and exit code --- cmd/p2psim/main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/p2psim/main.go b/cmd/p2psim/main.go index d32c29863149..6604b671fcc4 100644 --- a/cmd/p2psim/main.go +++ b/cmd/p2psim/main.go @@ -180,7 +180,10 @@ func main() { }, }, } - app.Run(os.Args) + if err := app.Run(os.Args); err != nil { + fmt.Fprintln(os.Stderr, err) + os.Exit(1) + } } func showNetwork(ctx *cli.Context) error {