move HAVE_JQ into req_programs

This commit is contained in:
Brad Solomon 2023-06-02 17:36:29 -04:00
parent 79407ce361
commit 523556b4ac

View file

@ -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"