add jq in node_function

This commit is contained in:
CanbiZ 2025-05-27 12:31:45 +02:00
parent 6f42afe22c
commit 821db3c079

View File

@ -32,6 +32,15 @@ install_node_and_modules() {
NEED_NODE_INSTALL=true NEED_NODE_INSTALL=true
fi 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 # Install Node.js if required
if [[ "$NEED_NODE_INSTALL" == true ]]; then if [[ "$NEED_NODE_INSTALL" == true ]]; then
$STD apt-get purge -y nodejs $STD apt-get purge -y nodejs