feat: some more debugging
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:40:05 +01:00
parent eeabeda036
commit 36b1335fe9
Signed by: kjuulh
GPG Key ID: D85D7535F18F35FA

View File

@ -37,9 +37,14 @@ chmod +x "${INSTALL_DIR}/${BINARY_NAME}"
res=$(churn agent setup --discovery "${CHURN_DISCOVERY}" 2>&1)
exit_code=$?
echo "Debug - Full output: $res"
echo "Debug - Exit code: $exit_code"
if [[ $exit_code != 0 ]]; then
if [[ "$res" != *"config file already exists"* ]]; then
echo "$res"
# Convert to lowercase to make matching more reliable
res_lower=$(echo "$res" | tr '[:upper:]' '[:lower:]')
if [[ "$res_lower" != *"config file already exists"* ]] && [[ "$res_lower" != *"already exists"* ]]; then
echo "Error: $res"
exit 1
fi
fi