We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0d06570 commit b299244Copy full SHA for b299244
1 file changed
database/bin/boot
@@ -30,9 +30,7 @@ function etcd_set_default {
30
set +e
31
ERROR="$(etcdctl --no-sync -C "$ETCD" mk "$ETCD_PATH/$1" "$2" 2>&1 >/dev/null)"
32
33
- # We're not compairing output with -n so error doesn't apply
34
- # shellcheck disable=SC2143
35
- if [[ $? -ne 0 && $(echo "$ERROR" | grep -ive "key already exists") ]]; then
+ if [[ $? -ne 0 ]] && echo "$ERROR" | grep -iqve "key already exists"; then
36
echo "etcd_set_default: an etcd error occurred ($ERROR)"
37
echo "aborting..."
38
exit 1
0 commit comments