Big NodeJS Update: Use Helper Function on all Install-Scripts (#4744)

* Big NodeJS Update: Use Helper Function on all Install-Scripts

* add jq in node_function

* add more
This commit is contained in:
CanbiZ 2025-05-27 13:48:34 +02:00 committed by GitHub
parent e6805db9f5
commit 72db97b226
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
58 changed files with 148 additions and 791 deletions

View file

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