Describe the bug

In redis 7.0-rc2 (at least) the exit code of redis-cli -h, is now 0, as opposed to 1. redis 6.2.6 exited error code 1.

To reproduce

  1. Run redis-cli compiled from the 6.2.6 tag: redis-cli -h ; echo $?
  2. Run redis-cli compiled from the 7.0-rc2 tag: redis-cli -h ; echo $?

Expected behavior

The exit code of redis-cli -h should continue to be 1, as per older versions.

Comment From: oranagra

@chayim please describe why is that behavior desired. i considered it a bug, and i don't think backwards compatibility is important in that case. p.s. this was done in #9124

Comment From: chayim

I don't have a hard reason for it, but noticed that all of the other binaries exhibit the same behaviour. I'd argue consistency in the behaviour is more valuable than an error code.

Comment From: oranagra

so let's fix them all... which ones did you mean?

i see that ps --help and redis-benchmark --help both return with 0.

Comment From: chayim

Correct. In redis 6.2.6, they all returned 1, as of 7.0x they all return 0. But - checking various gnu tools as you have, they all return zero. I'll close.