From d7a269a6e40de70beb0e502b8085cd70a0e2ee08 Mon Sep 17 00:00:00 2001 From: mmetc <92726601+mmetc@users.noreply.github.com> Date: Wed, 20 Apr 2022 09:45:23 +0200 Subject: [PATCH] wizard: removed jq dependency (#1460) --- Dockerfile | 2 +- wizard.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index dfdb0828a..2342c4580 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ FROM golang:${GOVERSION}-alpine AS build WORKDIR /go/src/crowdsec # wizard.sh requires GNU coreutils -RUN apk add --no-cache git jq gcc libc-dev make bash gettext binutils-gold coreutils +RUN apk add --no-cache git gcc libc-dev make bash gettext binutils-gold coreutils COPY . . diff --git a/wizard.sh b/wizard.sh index baf4d3ef8..35bff5dfd 100755 --- a/wizard.sh +++ b/wizard.sh @@ -508,7 +508,7 @@ install_plugins(){ check_running_bouncers() { #when uninstalling, check if user still has bouncers - BOUNCERS_COUNT=$(${CSCLI_BIN} bouncers list -o=json | jq '. | length') + BOUNCERS_COUNT=$(${CSCLI_BIN} bouncers list -o=raw | tail -n +2 | wc -l) if [[ ${BOUNCERS_COUNT} -gt 0 ]] ; then if [[ ${FORCE_MODE} == "false" ]]; then echo "WARNING : You have at least one bouncer registered (cscli bouncers list)."