-
Notifications
You must be signed in to change notification settings - Fork 24.5k
Closed
Description
Describe the bug
redis-cli exit code can be 1 or 255 on failure. Looks like it's inconsistent, not sure when to expect one or another.
To reproduce
This is how 255 is returned:
Line 9048 in b69636d
| return noninteractive(argc,argv); |
noninteractive() returns REDIS_ERR on failure, which is -1, it becomes 255 as exit codes are in range 0-255.
Expected behavior
As far as I see, nothing is wrong by doing this but it'd nice to be consistent. If we want to have a quick fix and use exit code 1 on all cases, we might be introducing a breaking change? I'm not sure if anybody relies on this.
Also, we had a quick conversation with @yossigo, we may further improve error codes by using different exit codes for different error cases as well.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done