Skip to content

Commit 9da128d

Browse files
terasumkaralabe
authored andcommitted
cmd/p2psim: add exit error output and exit code (#17116)
1 parent 4e5d1f1 commit 9da128d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cmd/p2psim/main.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,10 @@ func main() {
180180
},
181181
},
182182
}
183-
app.Run(os.Args)
183+
if err := app.Run(os.Args); err != nil {
184+
fmt.Fprintln(os.Stderr, err)
185+
os.Exit(1)
186+
}
184187
}
185188

186189
func showNetwork(ctx *cli.Context) error {

0 commit comments

Comments
 (0)