From 18615b785a0c6e88d2263d129a9f946285bf3dc1 Mon Sep 17 00:00:00 2001 From: Dmitry Smirnov Date: Thu, 28 Nov 2024 19:23:11 +0200 Subject: [PATCH] shell fix --- lib/worker_config.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/worker_config.sh b/lib/worker_config.sh index bd827b80..1c4dc08f 100644 --- a/lib/worker_config.sh +++ b/lib/worker_config.sh @@ -101,9 +101,7 @@ get_config_section() { # Attempt to extract the section and handle missing/null cases local extracted_section - extracted_section=$(echo "$config_json" | jq -r ".config.${section} // empty" 2>/dev/null) - - if [[ $? -ne 0 ]]; then + if ! extracted_section=$(echo "$config_json" | jq -r ".config.${section} // empty" 2>/dev/null); then log_error "Failed to parse section '${section}' from configuration." return 1 fi