diff --git a/functions/helper_lib.sh b/functions/helper_lib.sh index 6a348c1..6369fbf 100644 --- a/functions/helper_lib.sh +++ b/functions/helper_lib.sh @@ -11,6 +11,11 @@ req_programs() { for p in $1; do command -v "$p" >/dev/null 2>&1 || { printf "Required program not found: %s\n" "$p"; exit 1; } done + if command -v jq >/dev/null 2>&1; then + HAVE_JQ=true + else + HAVE_JQ=false + fi if command -v ss >/dev/null 2>&1; then netbin=ss return @@ -112,12 +117,6 @@ get_docker_configuration_file() { CONFIG_FILE='/dev/null' } -if command -v jq &> /dev/null; then - HAVE_JQ=true -else - HAVE_JQ=false -fi - get_docker_configuration_file_args() { OPTION="$1"