riverqueue / river

Fast and reliable background jobs in Go
https://riverqueue.com
Mozilla Public License 2.0
3.22k stars 86 forks source link

cmd/river: Exit code 0 on flag error #362

Closed vfaronov closed 3 months ago

vfaronov commented 3 months ago

When I run:

$ go run github.com/riverqueue/river/cmd/river@latest migrate-up

I get:

Error: required flag(s) "database-url" not set
Usage:
[...]

But the exit code is 0, which means success:

$ echo $?
0

The command should exit with a non-zero code on error.

brandur commented 3 months ago

Thanks. Fixed in #363.