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