feat: agent is already setup
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2024-11-30 11:44:51 +01:00
parent f7c7aef96b
commit 38a0a9fba4
Signed by: kjuulh
GPG Key ID: D85D7535F18F35FA

View File

@ -40,15 +40,13 @@ set +e
res=$(churn agent setup --discovery "${CHURN_DISCOVERY}" 2>&1)
set -e
exit_code=$?
echo "Command output: $res"
echo "Exit code: $exit_code"
if [[ $exit_code != 0 ]]; then
if [[ "$res" != *"config file already exists"* ]] && [[ "$res" != *"already exists"* ]]; then
echo "Error detected: $res"
exit 1
else
echo "Ignoring expected 'already exists' error"
echo "Ignoring setup 'agent is already setup'"
fi
fi