From 821db3c07976b19703200a3a8dd84d669db34665 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Tue, 27 May 2025 12:31:45 +0200 Subject: [PATCH] add jq in node_function --- misc/tools.func | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/misc/tools.func b/misc/tools.func index b533ffc31..f1ff7073a 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -32,6 +32,15 @@ install_node_and_modules() { NEED_NODE_INSTALL=true fi + if ! command -v jq &>/dev/null; then + $STD msg_info "Installing jq..." + $STD apt-get update -qq &>/dev/null + $STD apt-get install -y jq &>/dev/null || { + msg_error "Failed to install jq" + return 1 + } + fi + # Install Node.js if required if [[ "$NEED_NODE_INSTALL" == true ]]; then $STD apt-get purge -y nodejs