From d87fef08926c51c995159cca0d8e66c2df61965e Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Sat, 8 Aug 2026 04:35:03 +0200 Subject: [PATCH] core - setup_nodejs: bypass npm allowScripts policy globally on npm >=11 (#16280) * setup_nodejs: bypass npm allowScripts policy globally on npm >=11 * Update misc/tools.func Co-authored-by: Sam Heinz --------- Co-authored-by: Sam Heinz --- misc/tools.func | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/misc/tools.func b/misc/tools.func index 804b76e7c..e16a37ad3 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -7706,6 +7706,10 @@ setup_nodejs() { fi fi + if [[ "$(npm -v 2>/dev/null | cut -d. -f1)" -ge 11 ]]; then + $STD npm config set dangerously-allow-all-scripts true --location=global 2>/dev/null || true + fi + # Set a safe default heap limit for Node.js builds if not explicitly provided. # Priority: # 1) NODE_OPTIONS (caller/user override)