exit code incorrect
tao12345666333 opened this issue · 4 comments
tao12345666333 commented
Describe the bug
The exit code incorrect when remote host is unreachable or Redis instance is shutdown.
To Reproduce
(MoeLove) ➜ ~ docker pull redisrdbcli/redis-rdb-cli:v0.1.15
v0.1.15: Pulling from redisrdbcli/redis-rdb-cli
501dc83b5664: Already exists
481fef4b79f2: Already exists
2244fc6cc072: Already exists
09612e383bad: Pull complete
7a5b1246b03b: Pull complete
86b44717f545: Pull complete
Digest: sha256:1d029806a1b085b9bcc3615c0300c15e0f5a31bd99f453f98a0f9ea320cd62b9
Status: Downloaded newer image for redisrdbcli/redis-rdb-cli:v0.1.15
(MoeLove) ➜ ~ docker run --rm -it -v /work/rdb/down/manual.rdb:/tmp/dump.rdb redisrdbcli/redis-rdb-cli:v0.1.15 bash
bash-4.4# rmt -s /tmp/dump.rdb -m redis://172.17.0.2:6379
java.net.ConnectException: Connection refused (Connection refused)
bash-4.4# echo $?
0
bash-4.4#
bash-4.4# rmt -s /tmp/dump.rdb -m redis://172.17.0.4:6379
java.net.NoRouteToHostException: Host is unreachable (Host unreachable)
bash-4.4# echo $?
0
Expected behavior
The exit code shouldn't be 0
.
Version:
bash-4.4# rmt -v
redis rdb cli: v0.1.15 (a09d40c333f0796476a8e0eb6fbd43c4dc085559: 2019-02-24T07:27:35+0000)
rct home: /app/redis-rdb-cli/bin/..
java version: 1.8.0_171, vendor: Oracle Corporation
java home: /usr/lib/jvm/java-1.8-openjdk/jre
default locale: en, platform encoding: UTF-8
os name: Linux, version: 4.16.8-300.fc28.x86_64, arch: amd64
tao12345666333 commented
@leonchen83 PTAL, Thanks.
leonchen83 commented
I will check the code ASAP
leonchen83 commented
@tao12345666333
Fixed at 0.1.16
tao12345666333 commented
Thanks. I have tested it and it works fine. 👍
I will close this issue now.